Skip to content

fix(ci): replace deprecated --rm-dist with --clean for goreleaser v2#426

Merged
54m merged 1 commit into
masterfrom
fix/goreleaser-v2-clean-flag
May 2, 2026
Merged

fix(ci): replace deprecated --rm-dist with --clean for goreleaser v2#426
54m merged 1 commit into
masterfrom
fix/goreleaser-v2-clean-flag

Conversation

@54m
Copy link
Copy Markdown
Member

@54m 54m commented May 2, 2026

Summary

The release workflow has been silently broken since goreleaser v2.0.0 was published.

`goreleaser-action@v5.0.0` always downloads the latest goreleaser binary, so as soon as goreleaser v2 became latest, every push of a tag matching `v[0-9]+.[0-9]+.[0-9]+*` started running:

```
goreleaser release --rm-dist
```

…which fails with `unknown flag: --rm-dist`. The flag was deprecated in goreleaser v1.21 and removed in v2.0.0. The replacement is `--clean`.

Impact

`v2.14.0` was tagged and a GitHub Release was created (manually by Diamond Dogs after PR #421 / #422 merge), but the `release` workflow that publishes prebuilt binaries failed on the same push event. As a result, `v2.14.0` has 0 binary assets (cf. `v2.13.1` which has 7).

Fix

One-line change:

```diff

  • args: release --rm-dist
  • args: release --clean
    ```

Follow-up (out of scope)

The release manager will decide whether to:

  1. Force re-tag `v2.14.0` to re-trigger the workflow (risky for module proxy caches)
  2. Cut a fresh `v2.14.1` patch tag once this PR merges (safer)

Tracked via internal coordination.

Test plan

  • grep confirms only `release.yml` line is changed
  • Once merged, the next tag push will trigger goreleaser v2 with `--clean` and produce binary assets

The release workflow downloads the latest goreleaser binary (currently v2.15.4)
via goreleaser-action@v5.0.0, but the args still pass the v1-era --rm-dist flag.
That flag was removed in goreleaser v2.0.0 in favor of --clean, causing every
release run to fail with `unknown flag: --rm-dist`.

This caused v2.14.0 to be tagged and published with zero binary assets.
The fix is a one-line change so future releases produce binaries again.

Re-tagging or cutting a v2.14.1 patch is left to the release manager.

対象ファイル:
- .github/workflows/release.yml
@54m 54m merged commit 4465110 into master May 2, 2026
3 checks passed
@54m 54m deleted the fix/goreleaser-v2-clean-flag branch May 2, 2026 16:33
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