File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1616 default : ' main'
1717
1818permissions :
19+ # Needed for npm provenance or token auth
1920 id-token : write
21+ # Harmless here; no tag push, but keeps flexibility if added later
22+ contents : write
2023
2124jobs :
2225 release :
4346 with :
4447 node-version : 22
4548 cache : ' pnpm'
49+ registry-url : ' https://registry.npmjs.org'
4650
4751 # Update npm to the latest version to enable OIDC
4852 - name : Update npm
@@ -60,17 +64,22 @@ jobs:
6064
6165 - name : Build and test Packages
6266 run : |
63- git fetch origin main
67+ git fetch origin ${{ github.event.inputs.branch }} --tags --prune
6468 npx nx run-many --targets=build --projects=tag:type:pkg --skip-nx-cache
6569 npx nx run-many --targets=build --projects=tag:type:metro
6670 ls -l packages/*/dist packages/*/package.json
6771
6872 - name : Publish latest version
6973 if : github.event.inputs.version == 'latest'
74+ env :
75+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
7076 run : |
7177 pnpm -r publish --tag ${{ github.event.inputs.version }} --publish-branch ${{ github.event.inputs.branch }}
7278
7379 - name : Publish preview version
7480 if : github.event.inputs.version == 'next'
81+ env :
82+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
83+ NPM_CONFIG_PROVENANCE : ' true'
7584 run : |
7685 pnpm -r publish --tag next --no-git-checks
You can’t perform that action at this time.
0 commit comments