-
Notifications
You must be signed in to change notification settings - Fork 1
fix: Release tag mismatch — chocolatey/winget can't find GoReleaser releases #83
Description
Problem
GoReleaser OSS doesn't support monorepo.tag_prefix (Pro-only). The current workaround creates a temporary semver v{version} git tag so GoReleaser can parse the version. But GoReleaser then publishes the GitHub release under that v{version} tag instead of the real {tool}-v{version} tag.
Chocolatey and winget jobs then try to download assets from {tool}-v{version} → "release not found".
Example flow (jtk-v0.2.0)
- Auto-release creates tag
jtk-v0.2.0 - Release workflow creates temp local tag
v0.2.0 - GoReleaser publishes release under
v0.2.0✅ - Chocolatey tries
gh release download jtk-v0.2.0→ ❌ "release not found" - Winget tries
gh release download jtk-v0.2.0→ ❌ "release not found"
Current state on GitHub
- Real tags (from auto-release):
jtk-v0.1.14,jtk-v0.2.0,cfl-v0.9.13, etc. - Stale temp tags (leaked by GoReleaser):
v0.1.14,v0.2.0,v0.9.13, etc. - All releases point to
v*tags, not{tool}-v*tags
Impact
Blocks all chocolatey and winget releases for both tools. GoReleaser succeeds but downstream packaging jobs fail. Every run from Feb 2 through Feb 6 where GoReleaser succeeded hit this:
jtk-v0.1.100throughjtk-v0.1.103,jtk-v0.1.14,jtk-v0.2.0cfl-v0.9.100throughcfl-v0.9.103,cfl-v0.9.13
Fix
In both release-jtk.yml and release-cfl.yml:
-
After GoReleaser step, add a "Fix release tag" step to retag the release and clean up the temp tag:
- name: Fix release tag run: | VERSION=${{ steps.get_version.outputs.version }} gh release edit "v${VERSION}" --tag "jtk-v${VERSION}" git push origin :refs/tags/v${VERSION} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
Fix Go dependency cache (while we're in the workflow files): add
cache-dependency-pathtoactions/setup-go:- uses: actions/setup-go@v5 with: go-version: '1.24' cache-dependency-path: tools/jtk/go.sum
Currently
go.sumis attools/{tool}/go.sum, not the repo root, causing:Restore cache failed: Dependencies file is not found in .../atlassian-cli. Supported file pattern: go.sum
Files
.github/workflows/release-jtk.yml— add retag step + cache-dependency-path.github/workflows/release-cfl.yml— same changes withcfl-prefix
Depends on
- fix: Remove GoReleaser Pro-only
alternative_namesfrom jtk cask config #82 (goreleaser config must parse before this fix matters)