docs(release): document CI/CD authentication for release create
Summary
Users migrating from the deprecated release-cli to glab release create in CI often set GITLAB_TOKEN=$CI_JOB_TOKEN, which returns a silent 404 Not Found. glab routes GITLAB_TOKEN values as personal access tokens via the PRIVATE-TOKEN header, while the Releases API only accepts CI job tokens via the JOB-TOKEN header.
Expand the release create command's Long description and Example block to show the two supported CI patterns and call out the anti-pattern explicitly:
- Recommended:
GLAB_ENABLE_CI_AUTOLOGIN=true glab release create ...(job-token path, correct header). - Alternative: a project or group access token with the
apiscope, passed asGITLAB_TOKEN. - Anti-pattern:
GITLAB_TOKEN=$CI_JOB_TOKEN— silent 404, because glab sends the wrong header.
Refs #8378 (closed). Does not close the issue: the original Stat branch: no such file or directory symptom in the title is still unreproduced and unexplained.
Test plan
-
glab release create --helpshows the new "Authentication in CI/CD" section and the two CI examples. -
docs/source/release/create.mdrenders correctly ondocs.gitlab.compreview. - Hooks (
lefthook run pre-push) pass. - No code changes; existing
internal/commands/release/create/tests still pass.