File tree Expand file tree Collapse file tree 2 files changed +23
-8
lines changed Expand file tree Collapse file tree 2 files changed +23
-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"
1517jobs :
1618 test :
1719 runs-on : ubuntu-latest
20+ permissions :
21+ contents : read
1822 steps :
1923 - uses : actions/checkout@v6
2024 - uses : actions/setup-node@v6
2731 if : github.repository == 'web-platform-dx/web-features'
2832 runs-on : ubuntu-latest
2933 needs : " test"
34+ permissions :
35+ contents : read
36+ # Required for OIDC and trusted publishing. See:
37+ # - https://docs.npmjs.com/trusted-publishers
38+ # - https://docs.github.com/en/actions/concepts/security/openid-connect
39+ id-token : write
3040 steps :
3141 - name : Get timestamp
3242 id : timestamp
3747 node-version-file : .node-version
3848 cache : npm
3949 registry-url : " https://registry.npmjs.org"
50+ - run : npm install -g 'npm@>=11.5.1 # required for trusted publishing
4051 - run : npm ci
4152 - name : Get package.json version
4253 id : version
4960 VERSION : ${{ steps.version.outputs.VERSION }}
5061 TIMESTAMP : ${{ steps.timestamp.outputs.TIMESTAMP }}
5162 - 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"
2322jobs :
2423 test :
2524 runs-on : ubuntu-latest
25+ permissions :
26+ contents : read
2627 steps :
2728 - uses : actions/checkout@v6
2829 - uses : actions/setup-node@v6
3536 if : github.repository == 'web-platform-dx/web-features'
3637 runs-on : ubuntu-latest
3738 needs : " test"
39+ permissions :
40+ contents : write
41+ # Required for OIDC and trusted publishing. See:
42+ # - https://docs.npmjs.com/trusted-publishers
43+ # - https://docs.github.com/en/actions/concepts/security/openid-connect
44+ id-token : write
3845 steps :
3946 - uses : actions/checkout@v6
4047 - name : Get timestamp and short hash
4855 node-version-file : .node-version
4956 cache : npm
5057 registry-url : " https://registry.npmjs.org"
58+
59+ - run : npm install -g 'npm@>=11.5.1' # required for trusted publishing
5160 - run : npm ci
5261
5362 - run : npm run build
6776 VERSION : ${{ steps.version.outputs.VERSION }}
6877 TIMESTAMP : ${{ steps.timestamp_and_hash.outputs.TIMESTAMP }}
6978 SHORT_HASH : ${{ steps.timestamp_and_hash.outputs.SHORT_HASH }}
70- - if : ${{ env.NODE_AUTH_TOKEN }}
71- run : npm publish --tag ${{ env.dist_tag }}
79+ - run : npm publish --tag ${{ env.dist_tag }}
7280 working-directory : ${{ env.package_dir }}
73- env :
74- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
7581
7682 - name : Set existing release to draft
7783 run : gh release edit --draft "$TAG"
You can’t perform that action at this time.
0 commit comments