Skip to content

Commit bf30c58

Browse files
committed
fix: use OIDC trusted publishers instead of npm token
The npm package has trusted publishers (OIDC) configured. Remove manual token auth — let GitHub Actions OIDC handle it.
1 parent e3c3331 commit bf30c58

1 file changed

Lines changed: 3 additions & 19 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ jobs:
4242
- uses: actions/setup-node@v4
4343
with:
4444
node-version: 22
45-
46-
- name: Configure npm auth
47-
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
45+
registry-url: "https://registry.npmjs.org"
4846

4947
- name: Install dependencies
5048
run: bun install --frozen-lockfile
@@ -54,13 +52,6 @@ jobs:
5452
git config user.name "github-actions[bot]"
5553
git config user.email "github-actions[bot]@users.noreply.github.com"
5654
57-
- name: Debug auth
58-
run: |
59-
echo "npm version: $(npm --version)"
60-
echo "node version: $(node --version)"
61-
npm whoami 2>&1 || echo "whoami failed"
62-
cat ~/.npmrc | sed 's/npm_[a-zA-Z0-9]*/npm_REDACTED/g'
63-
6455
- name: Bump & publish core
6556
if: inputs.package == 'core' || inputs.package == 'both'
6657
working-directory: packages/core
@@ -71,18 +62,11 @@ jobs:
7162
7263
bun run build
7364
74-
echo "📋 Package contents:"
75-
npm pack --dry-run 2>&1 || true
76-
7765
if [ "${{ inputs.dry-run }}" = "true" ]; then
7866
echo "🏜️ Dry run — would publish @pascal-app/core@$VERSION"
7967
npm publish --dry-run --access public
8068
else
81-
npm publish --access public --loglevel verbose 2>&1 || {
82-
echo "❌ Publish failed, dumping debug log:"
83-
cat ~/.npm/_logs/*-debug-0.log 2>/dev/null | tail -50
84-
exit 1
85-
}
69+
npm publish --access public --provenance
8670
echo "📦 Published @pascal-app/core@$VERSION"
8771
fi
8872
@@ -100,7 +84,7 @@ jobs:
10084
echo "🏜️ Dry run — would publish @pascal-app/viewer@$VERSION"
10185
npm publish --dry-run --access public
10286
else
103-
npm publish --access public
87+
npm publish --access public --provenance
10488
echo "📦 Published @pascal-app/viewer@$VERSION"
10589
fi
10690

0 commit comments

Comments
 (0)