File tree Expand file tree Collapse file tree 2 files changed +18
-8
lines changed Expand file tree Collapse file tree 2 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 77 paths :
88 - packages/compute-baseline/**
99
10+ permissions : {}
11+
1012env :
1113 package : " compute-baseline"
1214 package_dir : " packages/compute-baseline"
2729 if : github.repository == 'web-platform-dx/web-features'
2830 runs-on : ubuntu-latest
2931 needs : " test"
32+ permissions :
33+ # Required for OIDC and trusted publishing. See:
34+ # - https://docs.npmjs.com/trusted-publishers
35+ # - https://docs.github.com/en/actions/concepts/security/openid-connect
36+ id-token : write
3037 steps :
3138 - name : Get timestamp
3239 id : timestamp
3744 node-version-file : .node-version
3845 cache : npm
3946 registry-url : " https://registry.npmjs.org"
47+ - run : npm install -g 'npm@>=11.5.1 # required for trusted publishing
4048 - run : npm ci
4149 - name : Get package.json version
4250 id : version
4957 VERSION : ${{ steps.version.outputs.VERSION }}
5058 TIMESTAMP : ${{ steps.timestamp.outputs.TIMESTAMP }}
5159 - run : npm publish --workspace=${{ env.package }} --tag ${{ env.dist_tag }}
52- env :
53- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 1212 - index.ts
1313 - scripts/build.ts
1414
15- permissions :
16- contents : write
15+ permissions : {}
1716
1817env :
1918 package : " web-features"
3534 if : github.repository == 'web-platform-dx/web-features'
3635 runs-on : ubuntu-latest
3736 needs : " test"
37+ permissions :
38+ contents : write
39+ # Required for OIDC and trusted publishing. See:
40+ # - https://docs.npmjs.com/trusted-publishers
41+ # - https://docs.github.com/en/actions/concepts/security/openid-connect
42+ id-token : write
3843 steps :
3944 - uses : actions/checkout@v6
4045 - name : Get timestamp and short hash
4853 node-version-file : .node-version
4954 cache : npm
5055 registry-url : " https://registry.npmjs.org"
56+
57+ - run : npm install -g 'npm@>=11.5.1' # required for trusted publishing
5158 - run : npm ci
5259
5360 - run : npm run build
6774 VERSION : ${{ steps.version.outputs.VERSION }}
6875 TIMESTAMP : ${{ steps.timestamp_and_hash.outputs.TIMESTAMP }}
6976 SHORT_HASH : ${{ steps.timestamp_and_hash.outputs.SHORT_HASH }}
70- - if : ${{ env.NODE_AUTH_TOKEN }}
71- run : npm publish --tag ${{ env.dist_tag }}
77+ - run : npm publish --tag ${{ env.dist_tag }}
7278 working-directory : ${{ env.package_dir }}
73- env :
74- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
7579
7680 - name : Set existing release to draft
7781 run : gh release edit --draft "$TAG"
You can’t perform that action at this time.
0 commit comments