fix(ci): replace deprecated --rm-dist with --clean for goreleaser v2#426
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
```
Follow-up (out of scope)
The release manager will decide whether to:
Tracked via internal coordination.
Test plan