File tree Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Expand file tree Collapse file tree 1 file changed +3
-19
lines changed Original file line number Diff line number Diff line change 11name : release
22
33on :
4- pull_request_target :
5- types : [closed]
6- branches :
7- - main
4+ push :
5+ tags :
6+ - " v*"
87
98# Remove default permissions of GITHUB_TOKEN for security
109# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
1110permissions : {}
1211
1312jobs :
1413 release :
15- if : github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'v')
1614 concurrency :
1715 group : release
1816 permissions :
3735
3836 - name : 📦 Release
3937 run : node ./scripts/release.mjs
40-
41- - name : 🏷️ Create tag
42- run : |
43- TAG_NAME=${{ github.event.pull_request.head.ref }}
44- git tag $TAG_NAME
45- git push origin $TAG_NAME
46-
47- - name : 🛳️ Create GitHub release
48- run : gh release create $TAG_NAME --title "$RELEASE_NAME" --notes "$BODY"
49- env :
50- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
51- TAG_NAME : ${{ github.event.pull_request.head.ref }}
52- RELEASE_NAME : ${{ github.event.pull_request.head.ref }}
53- BODY : ${{ github.event.pull_request.body }}
You can’t perform that action at this time.
0 commit comments