1010 runs-on : ${{ matrix.os }}
1111 strategy :
1212 matrix :
13- node : [" 20.x", " 22.x", " 24.x" ]
13+ node : [' 20.x', ' 22.x', ' 24.x' ]
1414 os : [ubuntu-latest]
1515
1616 steps :
2424 uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2525 with :
2626 node-version : ${{ matrix.node }}
27- cache : " pnpm"
27+ cache : ' pnpm'
2828
2929 - name : Install dependencies
3030 run : pnpm install
@@ -46,32 +46,34 @@ jobs:
4646 timeout-minutes : 15
4747 runs-on : ubuntu-latest
4848 if : github.ref == 'refs/heads/main'
49+ environment : ' release'
4950 needs : build
51+ permissions :
52+ id-token : write
53+ contents : write
54+ pull-requests : write
5055 steps :
5156 - name : Checkout
52- uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
57+ uses : actions/checkout@v6
5358 with :
5459 fetch-depth : 0
5560
56- - uses : pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4.3.0
57- name : Install pnpm
61+ - name : Set up Node.js
62+ uses : labd/gh-actions-typescript/ pnpm-install@main
5863
59- - name : Install node.js
60- uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
61- with :
62- node-version : 22
63- cache : " pnpm"
64+ - name : Run build
65+ run : pnpm build
6466
65- - name : Install dependencies
66- run : pnpm install
67+ - name : Upgrade npm for trusted publishing
68+ run : npm i -g npm@^11.6.4
6769
6870 - name : Create and publish versions
69- uses : changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0
71+ uses : changesets/action@v1
7072 with :
71- title : " Release new version"
72- commit : " update version"
73+ title : ' Release new version'
74+ commit : ' update version'
7375 publish : pnpm publish:ci
76+ version : pnpm publish:version
7477 env :
7578 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
76- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
77- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
79+ NPM_CONFIG_PROVENANCE : true
0 commit comments