Skip to content

Commit 7abe1fd

Browse files
committed
Add npm provenance
1 parent b7ca36d commit 7abe1fd

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/check.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ jobs:
1212
name: Check
1313
runs-on: ubuntu-latest
1414
steps:
15+
- name: Harden the runner
16+
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
17+
with:
18+
egress-policy: block
19+
allowed-endpoints: >
20+
api.github.com:443
21+
github.com:443
22+
release-assets.githubusercontent.com:443
23+
registry.npmjs.org:443
24+
*.sigstore.dev:443
1525
- name: Checkout the repository
1626
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1727
- name: Install pnpm
@@ -23,7 +33,6 @@ jobs:
2333
with:
2434
node-version: 24
2535
registry-url: 'https://registry.npmjs.org'
26-
scope: caniuse-lite
2736
- name: Check caniuse-db version
2837
id: caniuse
2938
run: node ./check.js
@@ -52,9 +61,9 @@ jobs:
5261
run: node ./commit.js
5362
- name: Publish
5463
if: steps.caniuse.outputs.newVersion
55-
run: ./node_modules/.bin/clean-publish &> publish.log
64+
run: ./node_modules/.bin/clean-publish -- --provenance &> publish.log
5665
env:
57-
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
66+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5867
- name: Check npm log
5968
if: steps.caniuse.outputs.newVersion
6069
run: node ./log.js

0 commit comments

Comments
 (0)