Skip to content

Use index .Env for the optional tap and bucket tokens - #50

Merged
tamnd merged 1 commit into
mainfrom
fix/skip-upload-template
Jun 19, 2026
Merged

Use index .Env for the optional tap and bucket tokens#50
tamnd merged 1 commit into
mainfrom
fix/skip-upload-template

Conversation

@tamnd

@tamnd tamnd commented Jun 19, 2026

Copy link
Copy Markdown
Owner

The Homebrew cask and Scoop manifest stanzas gated their token and skip_upload on envOrDefault, a sprig function GoReleaser does not define. A real tagged release aborted with 'function envOrDefault not defined' at the publish phase. goreleaser check does not evaluate templates, so this slipped past the check gate until v0.3.1 / v0.3.7 / v0.2.3 were cut.

index .Env "NAME" is the idiom GoReleaser documents for an optional variable: it returns the token when the secret is set (push the update) and an empty string when it is not (skip_upload stays true).

The Homebrew cask and Scoop manifest stanzas gated their token and
skip_upload on envOrDefault, which is a sprig function GoReleaser does
not define, so a real release aborted with 'function envOrDefault not
defined' the moment it reached the publish phase. goreleaser check does
not evaluate templates, so the gate slipped through until a tagged run.

Switch to index .Env "NAME", the idiom GoReleaser documents for an
optional variable: it yields the token when the secret is set (push the
update) and an empty string when it is not (skip_upload stays true).
@tamnd
tamnd merged commit 910619b into main Jun 19, 2026
9 checks passed
@tamnd
tamnd deleted the fix/skip-upload-template branch June 19, 2026 15:44
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