Skip to content

Commit 765d25d

Browse files
committed
Use npm trusted publishing instead of auth tokens
Remove manual NPM_AUTH_TOKEN configuration in favor of npm's trusted publishing feature, which uses GitHub's OIDC provider for secure authentication. This eliminates the need to manage npm access tokens as GitHub Secrets while maintaining provenance support.
1 parent 999d83c commit 765d25d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/main.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ jobs:
6363
node-version: "22"
6464
- uses: pnpm/action-setup@v4
6565
with:
66-
version: 10
66+
version: latest
67+
- run: npm install -g npm@latest && npm --version
6768
- if: github.ref_type == 'branch'
6869
run: |
6970
set -euo pipefail
@@ -81,15 +82,13 @@ jobs:
8182
deno task check-versions
8283
- run: |
8384
set -euo pipefail
84-
pnpm config set //registry.npmjs.org/:_authToken "$NPM_AUTH_TOKEN"
8585
pnpm install
8686
if [[ "$GITHUB_REF_TYPE" = tag ]]; then
8787
pnpm publish --recursive --access public --no-git-checks
8888
else
8989
pnpm publish --recursive --access public --no-git-checks --tag dev
9090
fi
9191
env:
92-
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
9392
NPM_CONFIG_PROVENANCE: "true"
9493
- run: deno publish --allow-dirty
9594
- if: github.ref_type == 'tag'

0 commit comments

Comments
 (0)