Skip to content

ci(release): use built-in GITHUB_TOKEN and pin release actions - #2

Merged
Charlie-Root merged 1 commit into
mainfrom
ci/release-github-token
Nov 4, 2026
Merged

Charlie-Root merged 1 commit into
mainfrom
ci/release-github-token

Conversation

@Charlie-Root

Copy link
Copy Markdown
Owner

Why

Releases 1.1.0 and 1.1.1 have no binaries: GoReleaser built them but failed to publish.

  • 1.1.0: 401 Bad credentials — the GH_TOKEN PAT was invalid/expired.
  • 1.1.1: 403 Resource not accessible by personal access token — the new fine-grained PAT lacks Contents: write on this repo.

Changes

  • release.yml: use the built-in GITHUB_TOKEN with permissions: contents: write — no PAT to rotate. The GH_TOKEN secret is no longer used and can be deleted.
  • Pin actions: checkout@v4, setup-go@v5 (Go version from go.mod), goreleaser-action@v6 with GoReleaser ~> v2 instead of @master / latest.
  • .goreleaser.yml: version: 2; nfpm description and homepage were left over from the GoReleaser sample project. The maintainer is still the sample value — please set your own.

After merge

Push a new tag (e.g. v1.1.2). A re-run of the old tags would still use the old workflow. The v prefix also makes the tag a valid Go module version (go install github.com/Charlie-Root/smcli@v1.1.2).

GH_TOKEN PAT failed with 401/403; contents: write on GITHUB_TOKEN is enough for GoReleaser.
@Charlie-Root
Charlie-Root merged commit 9efee97 into main Nov 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant