From 792878d6f3548404216b12a9077e8d33c09e265e Mon Sep 17 00:00:00 2001 From: Tam Nguyen Duc <1218621+tamnd@users.noreply.github.com> Date: Fri, 19 Jun 2026 23:03:59 +0700 Subject: [PATCH] Use the bare .Env form for the tap and bucket tokens (#51) GoReleaser validates that a repository token template is exactly {{ .Env.VAR_NAME }} and rejects any other interpolation, so the index .Env form aborted the publish with 'expected {{ .Env.VAR_NAME }} only'. The token is only rendered when an upload actually happens, and in CI the secret is always set, so the bare form is safe here. skip_upload keeps the index .Env form: it is not subject to the token rule and index degrades to an empty string when the secret is unset, so an unconfigured fork still skips the upload instead of erroring. --- .goreleaser.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index cb06880..0b3d387 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -151,7 +151,7 @@ homebrew_casks: repository: owner: tamnd name: homebrew-tap - token: '{{ index .Env "HOMEBREW_TAP_GITHUB_TOKEN" }}' + token: '{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}' directory: Casks homepage: https://github.com/tamnd/kage description: Clone any website for offline viewing, with the JavaScript stripped out @@ -168,7 +168,7 @@ scoops: repository: owner: tamnd name: scoop-bucket - token: '{{ index .Env "SCOOP_BUCKET_GITHUB_TOKEN" }}' + token: '{{ .Env.SCOOP_BUCKET_GITHUB_TOKEN }}' homepage: https://github.com/tamnd/kage description: Clone any website for offline viewing, with the JavaScript stripped out license: MIT