53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
# Use this workflow to trigger beta releases, both initial beta.1 and subsequent beta.x releases
|
|
|
|
name: Beta release
|
|
|
|
run-name: "Beta release (publish: ${{ inputs.publish }})"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
publish:
|
|
required: false
|
|
type: boolean
|
|
default: false
|
|
description: "Publish the beta release"
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
checks:
|
|
name: Pre-release checks
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
branch: ${{ steps.outputs.outputs.branch }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Determine the correct branch
|
|
id: outputs
|
|
run: |
|
|
set -x
|
|
if git branch -r | grep -w 'releases/beta'; then
|
|
echo "branch=releases/beta" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "branch=main" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
release:
|
|
name: Prepare beta release
|
|
needs: [checks]
|
|
uses: ./.github/workflows/reusable_publish_version.yml
|
|
with:
|
|
environment: beta
|
|
git-ref: ${{ needs.checks.outputs.branch }}
|
|
publish: ${{ inputs.publish }}
|
|
create-release: ${{ inputs.publish }}
|
|
secrets: inherit
|