ci: check the release token first and pass it to GoReleaser as a file #18

Merged
jwarykowski merged 1 commit from fix/release-token into main 2026-10-15 04:03:05 +00:00
Owner

Releases from Forgejo got 401 Bad credentials from GitHub even with a token that works locally.

  • A first step checks the token with gh api user and prints the account, so a bad token fails clearly.
  • GoReleaser reads the token from ~/.config/goreleaser/github_token with GITHUB_TOKEN unset, in case the runner puts its own Forgejo token there.
  • A manual run with a tag input releases that tag with this workflow (blank still builds a snapshot), so a failed release can be retried without moving the tag.
Releases from Forgejo got `401 Bad credentials` from GitHub even with a token that works locally. - A first step checks the token with `gh api user` and prints the account, so a bad token fails clearly. - GoReleaser reads the token from `~/.config/goreleaser/github_token` with `GITHUB_TOKEN` unset, in case the runner puts its own Forgejo token there. - A manual run with a `tag` input releases that tag with this workflow (blank still builds a snapshot), so a failed release can be retried without moving the tag.
ci: check the release token first and pass it to GoReleaser as a file
All checks were successful
CI / test (pull_request) Successful in 59s
d5914fbc87
Releases from Forgejo got 401 from GitHub with a working token, so the
workflow now prints which GitHub account the token belongs to before
building, and GoReleaser reads it from its token file with GITHUB_TOKEN
unset. A manual run with a tag releases that tag again with this workflow,
so a failed release doesn't need its tag moved.
jwarykowski deleted branch fix/release-token 2026-10-15 04:03:05 +00:00
Sign in to join this conversation.
No description provided.