Skip to content

create release

create release #49

name: "Create release"
on:
workflow_dispatch:
inputs:
name:
description: 'Release name'
default: ""
required: true
jobs:
verify-serverless-manifest-images:
name: Verify serverless manifest images
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Verify serverless manifest images
run: ./.github/scripts/verify-serverless-manifest-images.sh
verify-head-status:
name: Verify HEAD
needs: verify-serverless-manifest-images
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check tag
run: ./.github/scripts/check_release_tag.sh ${{ github.event.inputs.name }}
- name: Check image
run: ./.github/scripts/check_image.sh ${{ github.event.inputs.name }}
- name: Verify prow post jobs
run: ./.github/scripts/verify-serverless-status.sh ${{ github.ref_name }}
- name: Verify github actions
run: ./.github/scripts/verify-actions-status.sh ${{ github.ref_name }}
create-draft:
name: Create draft release
needs: verify-head-status
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
# - name: Create changelog
# uses: addnab/docker-run-action@3b7e5e2681a0bda95ee4ce0645c28ca1e78ce9ee
# with:
# image: githubchangeloggenerator/github-changelog-generator
# options: -v ${{ github.workspace }}:/usr/local/src/your-app
# run: github_changelog_generator -u kyma-project -p serverless -t ${{ secrets.GITHUB_TOKEN }} --enhancement-labels kind/feature,area/ci --bug-labels kind/bug --future-release ${{ github.event.inputs.name }} --unreleased-only --no-author
- name: Create draft release
id: create-draft
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
RELEASE_ID=$(./.github/scripts/create_draft_release.sh ${{ github.event.inputs.name }})
echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT
- name: Create lightweight tag
run: |
git tag ${{ github.event.inputs.name }}
git push origin ${{ github.event.inputs.name }}
outputs:
release_id: ${{ steps.create-draft.outputs.release_id }}
publish-release:
name: Publish release
needs: [verify-head-status, create-draft]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Publish release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./.github/scripts/publish_release.sh ${{ needs.create-draft.outputs.release_id }}