Skip to content

Commit 391d773

Browse files
jkebingerclaude
andauthored
Switch to npm publish for OIDC trusted publishing (#77)
Yarn 4.10.3's OIDC support is not working despite having all required environment variables set correctly. Switch to using npm CLI directly, which has mature OIDC trusted publishing support. Changes: - Remove debug output (no longer needed) - Add npm upgrade step to ensure npm >= 11.5.1 - Switch from "yarn npm publish" to "npm publish" - npm 11.5.1+ supports OIDC authentication automatically This will work with the trusted publishing configuration already set up on npmjs.com for @reforge-com/cli. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 93b1470 commit 391d773

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,16 @@ jobs:
7878
${{ runner.os }}-yarn-
7979
- run: yarn install --immutable
8080
- run: yarn build
81-
- name: Debug OIDC environment
82-
run: |
83-
echo "Checking OIDC environment variables..."
84-
echo "ACTIONS_ID_TOKEN_REQUEST_URL is set: $([[ -n "$ACTIONS_ID_TOKEN_REQUEST_URL" ]] && echo "yes" || echo "no")"
85-
echo "ACTIONS_ID_TOKEN_REQUEST_TOKEN is set: $([[ -n "$ACTIONS_ID_TOKEN_REQUEST_TOKEN" ]] && echo "yes" || echo "no")"
86-
echo "Yarn version: $(yarn --version)"
81+
- name: Upgrade npm for OIDC trusted publishing
82+
run: npm install -g npm@latest
8783
- name: Publish to npm
8884
run: |
89-
# Yarn 4.10.3+ supports OIDC trusted publishing
85+
# Use npm CLI directly - requires npm >= 11.5.1 for OIDC trusted publishing
86+
# Yarn 4.10.3 OIDC support appears broken despite all env vars being set correctly
9087
if [ "${{ needs.check-version.outputs.is-prerelease }}" == "true" ]; then
91-
yarn npm publish --provenance --access public --tag ${{ needs.check-version.outputs.npm-tag }}
88+
npm publish --provenance --access public --tag ${{ needs.check-version.outputs.npm-tag }}
9289
else
93-
yarn npm publish --provenance --access public
90+
npm publish --provenance --access public
9491
fi
9592
9693
create-release:

0 commit comments

Comments
 (0)