Skip to content

Release workflow

Release workflow #88

Workflow file for this run

name: Release workflow
on:
workflow_dispatch:
inputs:
tag_name:
description: "Version to produce"
required: true
type: string
release-as-draft:
description: "Whether it's a draft or not"
required: true
type: boolean
default: true
release-as-prerelease:
description: "Whether it's a prerelease or not"
required: true
type: boolean
default: false
generate-release-notes:
description: "Generate release notes"
required: true
type: boolean
default: true
jobs:
validate-input:
name: if tag_name is provided it must not start with "v"
runs-on: ubuntu-latest
steps:
- name: Check if tag_name starts with "v"
run: |
if [[ "${{ github.event.inputs.tag_name }}" == v* ]]; then
echo "tag_name starts with v"
exit 1
fi
build-release:
needs: validate-input
uses: ./.github/workflows/build.yml
secrets: inherit
with:
tag_name: ${{ github.event.inputs.tag_name }}
create-release:
name: Release
needs: build-release
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- name: Create release and upload binaries
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ inputs.tag_name }}
draft: ${{ inputs.release-as-draft }}
prerelease: ${{ inputs.release-as-prerelease }}
generate_release_notes: ${{ inputs.generate-release-notes }}
files: |
./massastation_*_bin/massastation_*
./massastation_installer_*/massastation_*.msi
./massastation_installer_*/massastation_*.pkg
./massastation_installer_*/massastation_*.deb