File tree Expand file tree Collapse file tree 4 files changed +75
-1135
lines changed Expand file tree Collapse file tree 4 files changed +75
-1135
lines changed Original file line number Diff line number Diff line change 1+ name : release
2+
3+ on :
4+ pull_request_target :
5+ types : [closed]
6+ branches :
7+ - main
8+
9+ permissions :
10+ pull-requests : write
11+ contents : write
12+
13+ jobs :
14+ release :
15+ if : github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'v')
16+ runs-on : ubuntu-latest
17+ steps :
18+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
19+
20+ - name : Create tag
21+ run : |
22+ TAG_NAME=${{ github.event.pull_request.head.ref }}
23+ git tag $TAG_NAME
24+ git push origin $TAG_NAME
25+
26+ - name : Create GitHub release
27+ run : |
28+ TAG_NAME=${{ github.event.pull_request.head.ref }}
29+ RELEASE_NAME=${{ github.event.pull_request.head.ref }}
30+ BODY=${{ github.event.pull_request.body }}
31+ gh release create $TAG_NAME --title "$RELEASE_NAME" --notes "$BODY"
32+ env :
33+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ # Remove default permissions of GITHUB_TOKEN for security
9+ # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
10+ permissions : {}
11+
12+ jobs :
13+ release :
14+ if : github.repository_owner == 'nuxt' && startsWith(github.event.head_commit.message, 'v')
15+ concurrency :
16+ group : release
17+ permissions :
18+ id-token : write
19+ runs-on : ubuntu-latest
20+ timeout-minutes : 20
21+ steps :
22+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23+ with :
24+ fetch-depth : 0
25+ - run : corepack enable
26+ - uses : actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
27+ with :
28+ node-version : lts/*
29+ registry-url : ' https://registry.npmjs.org/'
30+ cache : pnpm
31+
32+ - name : 📦 Install dependencies
33+ run : pnpm install
34+
35+ - name : 🛠 Build project
36+ run : pnpm build
37+
38+ - name : 📦 release nightly
39+ run : node ./scripts/release.mjs
40+ env :
41+ NPM_TOKEN : ${{ secrets.NPM_RELEASE_TOKEN }}
42+ NPM_CONFIG_PROVENANCE : true
You can’t perform that action at this time.
0 commit comments