chore: increment desktop version to 1.1.0-alpha-1
#154
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: Build & Release | |
on: | |
push: | |
tags: | |
- desktop-* | |
workflow_dispatch: | |
inputs: | |
debugElectronBuilder: | |
description: 'Verbose electron-builder output' | |
required: true | |
type: choice | |
options: | |
- 'false' | |
- 'true' | |
stage: | |
description: 'Environment to release the app for' | |
required: true | |
type: choice | |
options: | |
- alpha | |
- beta | |
- prod | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/desktop') | |
outputs: | |
version: ${{ steps.set_outputs.outputs.version }} | |
stage: ${{ steps.set_outputs.outputs.stage }} | |
release_name: ${{ steps.set_outputs.outputs.release_name }} | |
steps: | |
- id: set_outputs | |
name: Set outputs for version, release name, and stage | |
run: | | |
VERSION=${GITHUB_REF#refs/*/desktop-} | |
STAGE=$(echo $VERSION | perl -0777 -pe 's/^([0-9]\d*\.[0-9]\d*\.[0-9]\d*)(?:-([a-z]*)-([0-9]\d*(\.[0-9]\d*)*))?$/$2/') | |
RELEASE_NAME=$(echo $VERSION | perl -0777 -pe 's/^([0-9]\d*\.[0-9]\d*\.[0-9]\d*)(?:-([a-z]*)-(\d*))?$/$1 \u$2 $3/') | |
if [ -z "$STAGE" ]; then | |
STAGE="prod" | |
fi | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
echo "stage=$STAGE" >> $GITHUB_OUTPUT | |
echo "release_name=$RELEASE_NAME" >> $GITHUB_OUTPUT | |
trigger-build: | |
name: Build (Trigger) - ${{ matrix.os }} | |
uses: ./.github/workflows/reusable_build.yml | |
if: ${{ always() }} | |
needs: [setup] | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, windows-2022, macos-11] | |
fail-fast: true | |
with: | |
os: ${{ matrix.os }} | |
version: ${{ needs.setup.outputs.version }} | |
stage: ${{ inputs.stage || needs.setup.outputs.stage }} | |
sign: true | |
upload: true | |
secrets: inherit | |
trigger-release: | |
name: Release (Trigger) - ${{ needs.setup.outputs.version }} (${{ inputs.stage || needs.setup.outputs.stage }}) | |
uses: ./.github/workflows/reusable_release.yml | |
needs: [setup, trigger-build] | |
if: ${{ startsWith(github.ref, 'refs/tags/desktop') }} | |
with: | |
version: ${{ needs.setup.outputs.version }} | |
stage: ${{ inputs.stage || needs.setup.outputs.stage }} | |
release_name: ${{ needs.setup.outputs.release_name }} | |
secrets: inherit |