Release workflow #111
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: Release workflow | |
on: | |
workflow_dispatch: | |
inputs: | |
tag_name: | |
description: "Version to produce" | |
required: true | |
draft: | |
description: "Draft" | |
required: true | |
type: boolean | |
default: true | |
prerelease: | |
description: "Pre-release" | |
required: true | |
type: boolean | |
default: false | |
generate_release_notes: | |
description: "Generate release notes" | |
required: true | |
type: boolean | |
default: true | |
jobs: | |
check-manifest: | |
name: Check the Manifest | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check the manifest version | |
if: ${{ inputs.tag_name != '' }} | |
run: | | |
sudo apt-get install -y jq | |
version=$(jq -r '.version' manifest.json) | |
tag_name=${{ inputs.tag_name }} | |
tag_name_without_v=${tag_name#v} | |
if [[ $version != $tag_name_without_v ]]; then | |
echo "The manifest version is not equal to the tag version" | |
exit 1 | |
fi | |
build-release: | |
needs: check-manifest | |
uses: ./.github/workflows/build.yml | |
with: | |
tag_name: ${{ github.event.inputs.tag_name }} | |
draft: ${{ github.event.inputs.draft }} | |
prerelease: ${{ github.event.inputs.prerelease }} | |
generate_release_notes: ${{ github.event.inputs.generate_release_notes }} |