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.
This commit is contained in:
Tam Nguyen Duc
2026-06-19 23:03:59 +07:00
committed by GitHub
parent 910619bc7a
commit 792878d6f3
+2 -2
View File
@@ -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