Skip to content

Commit f5809e1

Browse files
ci: enable npm provenance (#849)
1 parent cf0fbb0 commit f5809e1

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

.github/workflows/ci.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
description: override release tag
88
required: false
99
push:
10-
branches: ['main', 'alpha', 'beta']
10+
branches: [main, alpha, beta]
1111

1212
concurrency:
1313
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
@@ -16,6 +16,10 @@ concurrency:
1616
env:
1717
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
1818

19+
permissions:
20+
contents: write
21+
id-token: write
22+
1923
jobs:
2024
test-and-publish:
2125
name: Test & Publish
@@ -42,10 +46,8 @@ jobs:
4246
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
4347
pnpm run cipublish
4448
env:
45-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
46-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
49+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4750
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
48-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4951
TAG: ${{ inputs.tag }}
5052
- name: Upload coverage to Codecov
5153
uses: codecov/codecov-action@v4

.github/workflows/pr.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ concurrency:
1414
env:
1515
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
test:
1922
name: Test
@@ -30,7 +33,7 @@ jobs:
3033
- name: Get base and head commits for `nx affected`
3134
uses: nrwl/nx-set-shas@v4
3235
with:
33-
main-branch-name: 'main'
36+
main-branch-name: main
3437
- name: Run Checks
3538
run: pnpm run test:pr --parallel=3
3639
- name: Stop Nx Agents

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
link-workspace-packages=true
22
prefer-workspace-packages=true
3+
provenance=true

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18.20.3
1+
20.15.1

0 commit comments

Comments
 (0)