Skip to content

Commit ecfde44

Browse files
committed
fix(ci): match strict OIDC trusted publisher spec
1 parent f98562d commit ecfde44

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,6 @@ jobs:
199199
fi
200200
201201
- name: Publish to NPM
202-
env:
203-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # Fallback if OIDC fails/missing
204202
run: |
205203
# Determine tag
206204
VERSION=$(node -p "require('./package.json').version")
@@ -213,11 +211,5 @@ jobs:
213211
echo "Detected Stable Release: Using tag 'latest'"
214212
fi
215213
216-
# Publish!
217-
# We attempt OIDC provenance first. If NPM_TOKEN is provided, it might override depending on config.
218-
# If the user wants to force token, they should probably remove id-token write or we can try logic.
219-
# Best bet: Keep provenance. If it fails, users usually fix OIDC.
220-
# But for now, we just pass the token. If OIDC is active, npm might still try it.
221-
222-
npm publish --provenance --access public $TAG_FLAG || \
223-
(echo "OIDC Publish failed, trying with token..." && npm publish --access public $TAG_FLAG)
214+
# Publish using OIDC (Trusted Publishing)
215+
npm publish --provenance --access public $TAG_FLAG

0 commit comments

Comments
 (0)