Skip to content

fix(release): gitignore dist-darwin/ so goreleaser sees a clean tree - #186

Merged
zzet merged 1 commit into
mainfrom
fix/release-goreleaser-dirty-tree
Jun 27, 2026
Merged

fix(release): gitignore dist-darwin/ so goreleaser sees a clean tree#186
zzet merged 1 commit into
mainfrom
fix/release-goreleaser-dirty-tree

Conversation

@zzet

@zzet zzet commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Problem

The v0.53.0 release job failed (run 28288459792) with:

⨯ release failed after 0s
  error= git is in a dirty state
  Please check in your pipeline what can be changing the following files:
  ?? dist-darwin/

The native-darwin work added in #178 stages the macOS archives in dist-darwin/ (downloaded as an artifact) before running goreleaser release --clean. goreleaser refuses to run on a dirty work tree, and the untracked dist-darwin/ tripped that check, so goreleaser aborted before creating the release — no v0.53.0 artifacts were published.

Fix

dist/ (goreleaser's own output) was already in .gitignore for exactly this reason; dist-darwin/ was simply missed. Ignore it too:

# Release: native-darwin archives the release job stages outside dist/ (which
# --clean wipes). Must be ignored or goreleaser aborts on a dirty work tree.
dist-darwin/

Verification

With dist-darwin/ populated, git status --porcelain (what goreleaser's dirty check reads) no longer reports it; git status --porcelain --ignored confirms the rule matches (!! dist-darwin/). This fixes future releases, matching #178's note about the release path.

Follow-up

The v0.53.0 tag produced no release artifacts (goreleaser aborted). After this merges, re-cut the tag (delete + re-push v0.53.0, or bump to v0.53.1) to actually publish the release.

The release job stages the native-built macOS archives in dist-darwin/
before running `goreleaser release --clean`. goreleaser refuses to run
on a dirty work tree, and the untracked dist-darwin/ tripped it:

    git is in a dirty state
    ?? dist-darwin/

dist/ (goreleaser's own output) was already ignored for the same reason;
dist-darwin/ was missed. Ignore it too so the staged darwin tarballs no
longer make the tree dirty.
@zzet
zzet merged commit dd80c8e into main Jun 27, 2026
9 checks passed
@zzet
zzet deleted the fix/release-goreleaser-dirty-tree branch June 27, 2026 19:57
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