semantic-release "ENOGHTOKEN No GitHub token specified"
semantic-release reads GH_TOKEN or GITHUB_TOKEN from the environment to publish a GitHub release. Without either, it aborts with ENOGHTOKEN before touching the repo.
What this error means
semantic-release fails early with "EGHNOPERMISSION" or "ENOGHTOKEN No GitHub token specified".
[semantic-release] ENOGHTOKEN No GitHub token specified.
A GitHub token must be created and set in the GH_TOKEN or GITHUB_TOKEN environment variable.Common causes
Token not passed as env
semantic-release reads the token from env, not from a with: input, so it must be set under env.
Insufficient token scope
A token without contents/issues write cannot create the release or comment on PRs.
How to fix it
Expose GITHUB_TOKEN in the step env
- Set GITHUB_TOKEN under env on the semantic-release step.
- Grant contents: write and issues: write at the workflow level.
- Re-run the release.
permissions:
contents: write
issues: write
pull-requests: write
steps:
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}How to prevent it
- Pass tokens to CLI-based release tools via env, not with: inputs.
- Grant the minimal write scopes semantic-release plugins require.