Skip to content

fix: use local semantic-release instead of yarn dlx#124

Merged
mbabic84 merged 1 commit intodevfrom
fix/use-local-semantic-release
Mar 20, 2026
Merged

fix: use local semantic-release instead of yarn dlx#124
mbabic84 merged 1 commit intodevfrom
fix/use-local-semantic-release

Conversation

@mbabic84
Copy link
Copy Markdown
Contributor

Summary

Use yarn semantic-release instead of yarn dlx semantic-release in the release workflow.

Problem

The yarn dlx approach doesn't work with npm OIDC Trusted Publishing. When running yarn dlx semantic-release, it spawns a sandboxed environment that loses the GitHub Actions OIDC token context, causing npm publish to fail with:

npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in to https://registry.npmjs.org/

Solution

Using yarn semantic-release runs the locally installed semantic-release within the same context that has OIDC access, preserving the trusted publishing authentication.

Changes

  • .github/workflows/release.yml — changed yarn dlx semantic-release to yarn semantic-release

Related

This is related to the Yarn Berry OIDC support - see yarnpkg/berry#6898 for details on OIDC support in Yarn.

The yarn dlx approach doesn't work with npm OIDC Trusted Publishing because it runs in a sandboxed environment that loses the OIDC token context.

Using 'yarn semantic-release' runs the locally installed semantic-release which properly inherits the GitHub Actions OIDC token for npm publishing.
@mbabic84 mbabic84 merged commit 1375dc4 into dev Mar 20, 2026
3 checks passed
@mbabic84 mbabic84 deleted the fix/use-local-semantic-release branch March 20, 2026 10:34
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant