File tree Expand file tree Collapse file tree 1 file changed +27
-6
lines changed Expand file tree Collapse file tree 1 file changed +27
-6
lines changed 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'
15+ if : github.repository == 'nuxt/bridge' && github.event.pull_request.merged == true && (startsWith(github.event.pull_request.head.ref, 'v3.') || startsWith(github.event.pull_request.head.ref, 'v4.'))
16+ concurrency :
17+ group : release
1518 permissions :
19+ contents : write
1620 id-token : write
1721 runs-on : ubuntu-latest
1822 timeout-minutes : 20
2731 registry-url : " https://registry.npmjs.org/"
2832 cache : " pnpm"
2933
30- - name : Install dependencies
34+ - name : 📦 Install dependencies
3135 run : pnpm install
3236
33- - name : Release
37+ - name : 🛠 Build and release project
3438 run : ./scripts/release.sh
39+ env :
40+ TAG : latest
41+
42+ - name : 🏷️ Create tag
43+ env :
44+ TAG_NAME : ${{ github.event.pull_request.head.ref }}
45+ run : |
46+ git tag "$TAG_NAME"
47+ git push origin "$TAG_NAME"
48+
49+ - name : 🛳️ Create GitHub release
50+ env :
51+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
52+ TAG_NAME : ${{ github.event.pull_request.head.ref }}
53+ RELEASE_NAME : ${{ github.event.pull_request.head.ref }}
54+ BODY : ${{ github.event.pull_request.body }}
55+ run : gh release create "$TAG_NAME" --title "$RELEASE_NAME" --notes "$BODY"
You can’t perform that action at this time.
0 commit comments