Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Enable provenance #819

Merged
merged 4 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@ jobs:
cd:
name: Deployment
runs-on: ubuntu-24.04
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for NPM provenance
needs:
- lint
- ci-core
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/snapshot-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ on:
inputs:
version:
description: Base version to use for the release
required: true
type: string
default: '0.0.0'
env:
FORCE_COLOR: 3 # Diplay chalk colors

jobs:
snapshot:
name: Deployment
runs-on: ubuntu-24.04
permissions:
id-token: write # to enable use of OIDC for NPM provenance
steps:
- name: Generate snapshot version
id: version
Expand All @@ -29,15 +31,15 @@ jobs:
node-version-file: .node-version
cache: pnpm
- name: Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile
run: pnpm install --ignore-scripts --frozen-lockfile --filter nuqs...
- name: Build package
run: pnpm build --filter nuqs
- name: Publish package
working-directory: packages/nuqs
run: |
pnpm pkg set version=${{ steps.version.outputs.version }}
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
pnpm publish --access public --tag snapshot --no-git-checks
pnpm publish --access public --provenance --tag snapshot --no-git-checks
rm -f .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion packages/nuqs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"react-router"
],
"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},
"files": [
"dist/",
Expand Down
Loading