File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Finalize Release
2
+ on :
3
+ pull_request :
4
+ types :
5
+ - closed
6
+ branches :
7
+ - " rc/**"
8
+
9
+ jobs :
10
+ finalize-release :
11
+ if : github.event.pull_request.merged == true
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : Checkout
15
+ uses : actions/checkout@v4
16
+ with :
17
+ ref : ${{ github.event.pull_request.merge_commit_sha }}
18
+
19
+ - name : Create release tag
20
+ env :
21
+ BASE_REF : ${{ github.event.pull_request.base.ref }}
22
+ run : |
23
+ version=${BASE_REF#rc/}
24
+ echo "Creating release tag v$version"
25
+
26
+ git tag -a v$version -m "Release v$version"
27
+ git push origin v$version
28
+
29
+ - name : Finalize release
30
+ env :
31
+ BASE_REF : ${{ github.event.pull_request.base.ref }}
32
+ GITHUB_TOKEN : ${{ github.token }}
33
+ run : |
34
+ version=${BASE_REF#rc/}
35
+ echo "Finalizing release v$version"
36
+
37
+ gh release edit v$version \
38
+ --draft false \
39
+ --prerelease false \
40
+ --latest \
41
+ --tag v$version
You can’t perform that action at this time.
0 commit comments