11name : Release
2+ permissions : {}
23
34on :
45 push :
@@ -13,48 +14,53 @@ jobs:
1314 name : Release
1415 if : github.repository_owner == 'expressive-code'
1516 runs-on : ubuntu-latest
17+ permissions :
18+ contents : write
19+ pull-requests : write
20+ id-token : write
1621 steps :
1722 - name : Check out repository
18- uses : actions/checkout@v4
19-
23+ uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
24+ with :
25+ persist-credentials : false
26+
2027 - name : Setup PNPM
21- uses : pnpm/action-setup@v4
22-
28+ uses : pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
29+
2330 - name : Setup Node.js
24- uses : actions/setup-node@v4
31+ uses : actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
2532 with :
26- node-version : 20
33+ node-version : 24
2734 cache : ' pnpm'
28-
35+
2936 - name : Install dependencies
3037 run : pnpm install --frozen-lockfile
31-
38+
3239 - name : Check for unreleased changesets
3340 id : has-changesets
34- uses : andstor/file-existence-action@v2
41+ uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
3542 with :
3643 files : " .changeset/!(README).md"
37-
44+
3845 # If there are unreleased changesets, validate the project before creating the changesets PR
3946 - name : Require build, test and lint to pass
4047 if : steps.has-changesets.outputs.files_exists == 'true'
4148 run : |
4249 pnpm build
4350 pnpm test
4451 pnpm lint
45-
52+
4653 # Run changesets action either if there are unreleased changesets (= a PR must be created)
4754 # or if the commit message matches the release PR (= new versions must be published to NPM)
48- # or if the workflow was triggered manually through `workflow_dispatch`
4955 - name : Create changesets PR or publish to NPM
5056 id : changesets
5157 if : steps.has-changesets.outputs.files_exists == 'true' || startsWith(github.event.head_commit.message, '[CI] Release') || github.event_name == 'workflow_dispatch'
52- uses : changesets/action@v1
58+ uses : changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba # v1.5.3
5359 with :
5460 title : ' [CI] Release'
5561 commit : ' [CI] Release'
5662 version : ' pnpm ci-version'
5763 publish : ' pnpm ci-publish'
5864 env :
5965 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
66+ NPM_TOKEN : " " # See https://github.com/changesets/changesets/issues/1152#issuecomment-3190884868
0 commit comments