Skip to content

Commit 0054eb3

Browse files
ci: enable npm provenance (#5654)
1 parent 241f26f commit 0054eb3

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
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', 'rc']
10+
branches: [main, alpha, beta, rc]
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,6 +46,6 @@ jobs:
4246
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
4347
pnpm run cipublish
4448
env:
45-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
49+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4650
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4751
TAG: ${{ inputs.tag }}

.github/workflows/pr.yml

Lines changed: 4 additions & 1 deletion
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18.19.0
1+
20.15.1

0 commit comments

Comments
 (0)