Skip to content

Commit 0ac9343

Browse files
committed
Add dispatch trigger for testing purposes
1 parent c453ddc commit 0ac9343

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

.github/workflows/finalize-release.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,41 @@ on:
55
- closed
66
branches:
77
- "rc/**"
8+
workflow_dispatch:
9+
inputs:
10+
ref:
11+
description: |
12+
The branch for which the finalize the release.
13+
required: true
14+
push:
15+
branches:
16+
- rvermeulen/release-process-improvements
817

918
jobs:
1019
finalize-release:
11-
if: github.event.pull_request.merged == true
20+
if: (github.event.name == "pull_request" && github.event.pull_request.merged == true) || github.event_name == 'workflow_dispatch'
1221
runs-on: ubuntu-latest
1322
steps:
23+
- name: Determine ref
24+
env:
25+
REF_FROM_INPUT: ${{ inputs.ref }}
26+
REF_FROM_PR: ${{ github.event.pull_request.merge_commit_sha }}
27+
BASE_REF_FROM_PR: ${{ github.event.pull_request.base.ref }}
28+
run: |
29+
if [[ $GITHUB_EVENT_NAME == "workflow_dispatch" ]]; then
30+
echo "REF=$REF_FROM_INPUT" >> "$GITHUB_ENV"
31+
echo "BASE_REF=$REF_FROM_INPUT" >> "$GITHUB_ENV
32+
else
33+
echo "REF=$REF_FROM_PR" >> "$GITHUB_ENV"
34+
echo "BASE_REF=$BASE_REF_FROM_PR" >> "$GITHUB_ENV"
35+
fi
36+
1437
- name: Checkout
1538
uses: actions/checkout@v4
1639
with:
17-
ref: ${{ github.event.pull_request.merge_commit_sha }}
40+
ref: ${{ env.REF }}
1841

1942
- name: Create release tag
20-
env:
21-
BASE_REF: ${{ github.event.pull_request.base.ref }}
2243
run: |
2344
version=${BASE_REF#rc/}
2445
echo "Creating release tag v$version"

0 commit comments

Comments
 (0)