File tree Expand file tree Collapse file tree 2 files changed +23
-40
lines changed Expand file tree Collapse file tree 2 files changed +23
-40
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11name : release
22
33on :
4- push :
5- tags :
6- - ' v*'
4+ pull_request_target :
5+ types : [closed]
6+ branches :
7+ - main
78
89# Remove default permissions of GITHUB_TOKEN for security
910# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
1011permissions : {}
1112
1213jobs :
1314 release :
14- if : github.repository_owner == 'nuxt' && startsWith(github.event.head_commit.message , 'v')
15- concurrency :
15+ if : github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref , 'v')
16+ concurrency :
1617 group : release
1718 permissions :
19+ contents : write
1820 id-token : write
1921 runs-on : ubuntu-latest
2022 timeout-minutes : 20
3537 - name : 🛠 Build project
3638 run : pnpm build
3739
38- - name : 📦 release nightly
40+ - name : 📦 Release
3941 run : node ./scripts/release.mjs
4042 env :
41- NPM_TOKEN : ${{ secrets.NPM_RELEASE_TOKEN }}
43+ NODE_AUTH_TOKEN : ${{ secrets.NPM_RELEASE_TOKEN }}
4244 NPM_CONFIG_PROVENANCE : true
45+
46+ - name : 🏷️ Create tag
47+ run : |
48+ TAG_NAME=${{ github.event.pull_request.head.ref }}
49+ git tag $TAG_NAME
50+ git push origin $TAG_NAME
51+
52+ - name : 🛳️ Create GitHub release
53+ run : gh release create $TAG_NAME --title "$RELEASE_NAME" --notes "$BODY"
54+ env :
55+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
56+ TAG_NAME : ${{ github.event.pull_request.head.ref }}
57+ RELEASE_NAME : ${{ github.event.pull_request.head.ref }}
58+ BODY : ${{ github.event.pull_request.body }}
You can’t perform that action at this time.
0 commit comments