Skip to content

Commit 01edd99

Browse files
committed
add beta release support
Signed-off-by: Samet Akcay <[email protected]>
1 parent 084331d commit 01edd99

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

.github/workflows/_reusable-release-status.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,25 @@ on:
5757
prod-status:
5858
required: true
5959
type: string
60+
beta-status:
61+
required: true
62+
type: string
6063

6164
jobs:
6265
check-status:
6366
runs-on: ubuntu-latest
6467
steps:
6568
- name: Verify workflow status
6669
run: |
67-
if [[ "${{ inputs.rc-status }}" == "failure" || "${{ inputs.prod-status }}" == "failure" ]]; then
70+
if [[ "${{ inputs.rc-status }}" == "failure" || "${{ inputs.prod-status }}" == "failure" || "${{ inputs.beta-status }}" == "failure" ]]; then
6871
echo "::error::Release workflow failed"
6972
exit 1
7073
fi
7174
7275
if [[ "${{ inputs.version }}" =~ -rc ]]; then
7376
echo "Release candidate ${{ inputs.version }} processed successfully"
77+
elif [[ "${{ inputs.version }}" =~ -beta ]]; then
78+
echo "Beta release ${{ inputs.version }} processed successfully"
7479
else
7580
echo "Production release ${{ inputs.version }} completed successfully"
7681
fi

.github/workflows/release.yaml

+20-2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ on:
5050
tags:
5151
- "v*.*.*"
5252
- "v*.*.*-rc*"
53+
- "v*.*.*-beta*"
5354
workflow_dispatch:
5455
inputs:
5556
version:
@@ -86,7 +87,17 @@ jobs:
8687

8788
production-release-process:
8889
needs: [validation]
89-
if: ${{ !contains(needs.validation.outputs.version, '-rc') }}
90+
if: ${{ !contains(needs.validation.outputs.version, '-rc') && !contains(needs.validation.outputs.version, '-beta') }}
91+
uses: ./.github/workflows/_reusable-production-release-process.yaml
92+
with:
93+
version: ${{ needs.validation.outputs.version }}
94+
artifact-name: ${{ needs.validation.outputs.artifact-name }}
95+
secrets:
96+
pypi-token: ${{ secrets.PYPI_TOKEN }}
97+
98+
beta-release-process:
99+
needs: [validation]
100+
if: contains(needs.validation.outputs.version, '-beta')
90101
uses: ./.github/workflows/_reusable-production-release-process.yaml
91102
with:
92103
version: ${{ needs.validation.outputs.version }}
@@ -95,10 +106,17 @@ jobs:
95106
pypi-token: ${{ secrets.PYPI_TOKEN }}
96107

97108
status:
98-
needs: [validation, rc-release-process, production-release-process]
109+
needs:
110+
[
111+
validation,
112+
rc-release-process,
113+
production-release-process,
114+
beta-release-process,
115+
]
99116
if: always() && !inputs.dry_run
100117
uses: ./.github/workflows/_reusable-release-status.yaml
101118
with:
102119
version: ${{ needs.validation.outputs.version }}
103120
rc-status: ${{ needs.rc-release-process.result }}
104121
prod-status: ${{ needs.production-release-process.result }}
122+
beta-status: ${{ needs.beta-release-process.result }}

0 commit comments

Comments
 (0)