Skip to content

Commit 6147189

Browse files
committed
fix: remove .npmrc authToken to allow OIDC fallback for trusted publishing
1 parent 9f9da88 commit 6147189

1 file changed

Lines changed: 3 additions & 26 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,36 +20,13 @@ jobs:
2020
with:
2121
node-version: 22
2222
cache: npm
23+
registry-url: https://registry.npmjs.org
2324

2425
- run: npm ci
2526

26-
- name: Detect publish auth mode
27-
id: publish_auth
28-
shell: bash
29-
env:
30-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
31-
run: |
32-
if [ -n "$NPM_TOKEN" ]; then
33-
echo "has_npm_token=true" >> "$GITHUB_OUTPUT"
34-
else
35-
echo "has_npm_token=false" >> "$GITHUB_OUTPUT"
36-
fi
37-
38-
- name: Create Release Pull Request or Publish (NPM token)
39-
if: ${{ steps.publish_auth.outputs.has_npm_token == 'true' }}
40-
uses: changesets/action@v1
41-
with:
42-
publish: npm run release
43-
version: npm run version
44-
commit: "chore: release packages"
45-
title: "chore: release packages"
46-
env:
47-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
49-
NPM_CONFIG_PROVENANCE: true
27+
- run: sed -i '/_authToken/d' "$HOME/.npmrc"
5028

51-
- name: Create Release Pull Request or Publish (Trusted Publisher)
52-
if: ${{ steps.publish_auth.outputs.has_npm_token == 'false' }}
29+
- name: Create Release Pull Request or Publish
5330
uses: changesets/action@v1
5431
with:
5532
publish: npm run release

0 commit comments

Comments
 (0)