Create release #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Create release" | |
on: | |
workflow_dispatch: | |
inputs: | |
name: | |
description: 'Create release' | |
default: "" | |
required: true | |
since: | |
description: 'Changelog since' | |
default: "" | |
required: false | |
jobs: | |
create-draft: | |
name: Create draft release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Ensure SHA pinned actions | |
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@555a30da2656b4a7cf47b107800bef097723363e # 2.1.3 | |
with: | |
allowlist: | | |
actions/checkout | |
actions/setup-go | |
- name: Create changelog | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./scripts/create_changelog.sh ${{ github.event.inputs.name }} ${{ github.event.inputs.since }} | |
- name: Create draft release | |
id: create-draft | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
RELEASE_ID=$(./scripts/create_draft_release.sh ${{ github.event.inputs.name }}) | |
echo $RELEASE_ID | |
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: [create-draft] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# - name: Wait for image build to succeed | |
# uses: lewagon/wait-on-check-action@e106e5c43e8ca1edea6383a39a01c5ca495fd812 # 1.3.1 | |
# with: | |
# ref: ${{ github.ref }} | |
# repo-token: ${{ secrets.GITHUB_TOKEN }} | |
# running-workflow-name: 'Publish release' | |
# check-name: rel-istio-build | |
# wait-interval: 20 | |
# - name: Wait for module template build to succeed | |
# uses: lewagon/wait-on-check-action@e106e5c43e8ca1edea6383a39a01c5ca495fd812 # 1.3.1 | |
# with: | |
# ref: ${{ github.ref }} | |
# repo-token: ${{ secrets.GITHUB_TOKEN }} | |
# running-workflow-name: 'Publish release' | |
# check-name: rel-istio-module-build | |
# wait-interval: 20 | |
- name: Publish release assets | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./scripts/publish_assets.sh ${{ github.event.inputs.name }} ${{ needs.create-draft.outputs.release_id }} | |
- name: Publish release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./scripts/publish_release.sh ${{ needs.create-draft.outputs.release_id }} |