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".
github-actions
[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.
.github/workflows/release.yml
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.
Related guides
release-please "no release created" (no conventional commits)Fix release-please silently creating no release because no Conventional Commits (feat/fix) landed since the l…
ncipollo/release-action "missing token" / 401 on release createFix ncipollo/release-action failing with a missing token error when no GITHUB_TOKEN is supplied to the releas…
actions/github-script "Resource not accessible by integration" (contents: write missing)Fix actions/github-script "Resource not accessible by integration" caused by a missing contents: write (or ot…