Skip to content

Commit

Permalink
ci: enable npm provenance (#849)
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlancollins authored Jul 11, 2024
1 parent cf0fbb0 commit f5809e1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
description: override release tag
required: false
push:
branches: ['main', 'alpha', 'beta']
branches: [main, alpha, beta]

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
Expand All @@ -16,6 +16,10 @@ concurrency:
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

permissions:
contents: write
id-token: write

jobs:
test-and-publish:
name: Test & Publish
Expand All @@ -42,10 +46,8 @@ jobs:
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
pnpm run cipublish
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
TAG: ${{ inputs.tag }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ concurrency:
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

permissions:
contents: read

jobs:
test:
name: Test
Expand All @@ -30,7 +33,7 @@ jobs:
- name: Get base and head commits for `nx affected`
uses: nrwl/nx-set-shas@v4
with:
main-branch-name: 'main'
main-branch-name: main
- name: Run Checks
run: pnpm run test:pr --parallel=3
- name: Stop Nx Agents
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
link-workspace-packages=true
prefer-workspace-packages=true
provenance=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.20.3
20.15.1

0 comments on commit f5809e1

Please sign in to comment.