2023-12-11 13:58:43 +00:00
|
|
|
# Use this workflow to trigger beta releases, both initial beta.1 and subsequent beta.x releases
|
|
|
|
|
2023-12-06 14:46:23 +00:00
|
|
|
name: Beta release
|
|
|
|
|
2023-12-12 12:45:17 +00:00
|
|
|
run-name: "Beta release (publish: ${{ inputs.publish }}, bump version: ${{ inputs.bump-version }})"
|
2023-12-06 14:46:23 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
publish:
|
|
|
|
required: false
|
|
|
|
type: boolean
|
|
|
|
default: false
|
|
|
|
description: "Publish the beta release"
|
2023-12-12 12:45:17 +00:00
|
|
|
bump-version:
|
|
|
|
required: false
|
|
|
|
type: boolean
|
|
|
|
default: false
|
|
|
|
description: "Bump the version of the current beta if this is not the initial one"
|
2023-12-06 14:46:23 +00:00
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
2023-12-11 13:58:43 +00:00
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
2023-12-06 14:46:23 +00:00
|
|
|
jobs:
|
2023-12-11 13:58:43 +00:00
|
|
|
checks:
|
|
|
|
name: Pre-release checks
|
2023-12-06 14:46:23 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-12-11 13:58:43 +00:00
|
|
|
outputs:
|
|
|
|
branch: ${{ steps.outputs.outputs.branch }}
|
2023-12-06 14:46:23 +00:00
|
|
|
steps:
|
2023-12-11 13:58:43 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-06 14:46:23 +00:00
|
|
|
with:
|
2023-12-11 13:58:43 +00:00
|
|
|
fetch-depth: 0
|
2023-12-06 14:46:23 +00:00
|
|
|
|
2023-12-11 13:58:43 +00:00
|
|
|
- name: Determine the correct branch
|
|
|
|
id: outputs
|
2023-12-06 14:46:23 +00:00
|
|
|
run: |
|
|
|
|
set -x
|
2023-12-11 13:58:43 +00:00
|
|
|
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 }}
|
2023-12-12 12:45:17 +00:00
|
|
|
bump-version: ${{ inputs.bump-version }}
|
2023-12-11 13:58:43 +00:00
|
|
|
publish: ${{ inputs.publish }}
|
|
|
|
create-release: ${{ inputs.publish }}
|
|
|
|
secrets: inherit
|