File tree Expand file tree Collapse file tree 1 file changed +25
-4
lines changed Expand file tree Collapse file tree 1 file changed +25
-4
lines changed Original file line number Diff line number Diff line change 5
5
- closed
6
6
branches :
7
7
- " 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
8
17
9
18
jobs :
10
19
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'
12
21
runs-on : ubuntu-latest
13
22
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
+
14
37
- name : Checkout
15
38
uses : actions/checkout@v4
16
39
with :
17
- ref : ${{ github.event.pull_request.merge_commit_sha }}
40
+ ref : ${{ env.REF }}
18
41
19
42
- name : Create release tag
20
- env :
21
- BASE_REF : ${{ github.event.pull_request.base.ref }}
22
43
run : |
23
44
version=${BASE_REF#rc/}
24
45
echo "Creating release tag v$version"
You can’t perform that action at this time.
0 commit comments