Skip to content

Commit c6d68d8

Browse files
ci: enable npm provenance (TanStack#7716)
* ci: enable npm provenance * Update @tanstack/config
1 parent b58da75 commit c6d68d8

File tree

6 files changed

+114
-204
lines changed

6 files changed

+114
-204
lines changed

.github/workflows/ci.yml

+6-2
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', 'v4']
10+
branches: [main, alpha, beta, rc, v4]
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,7 +46,7 @@ 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 }}
4852
- name: Upload coverage to Codecov

.github/workflows/pr.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ concurrency:
1212
env:
1313
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
1414

15+
permissions:
16+
contents: read
17+
1518
jobs:
1619
test:
1720
name: Test
@@ -28,8 +31,8 @@ jobs:
2831
- name: Get base and head commits for `nx affected`
2932
uses: nrwl/nx-set-shas@v4
3033
with:
31-
main-branch-name: 'main'
32-
- name: Run Tests
34+
main-branch-name: main
35+
- name: Run Checks
3336
run: pnpm run test:pr --parallel=3
3437
- name: Stop Nx Agents
3538
if: ${{ always() }}

.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-
v22.2.0
1+
22.4.0

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@cspell/eslint-plugin": "^8.9.1",
4343
"@eslint-react/eslint-plugin": "^1.5.16",
4444
"@solidjs/testing-library": "^0.8.8",
45-
"@tanstack/config": "^0.9.0",
45+
"@tanstack/config": "^0.9.6",
4646
"@testing-library/jest-dom": "^6.4.5",
4747
"@testing-library/react": "^15.0.7",
4848
"@types/node": "^20.12.12",

0 commit comments

Comments
 (0)