Skip to content

fix: Release tag mismatch — chocolatey/winget can't find GoReleaser releases #83

@rianjs

Description

@rianjs

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)

  1. Auto-release creates tag jtk-v0.2.0
  2. Release workflow creates temp local tag v0.2.0
  3. GoReleaser publishes release under v0.2.0
  4. Chocolatey tries gh release download jtk-v0.2.0 → ❌ "release not found"
  5. 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.100 through jtk-v0.1.103, jtk-v0.1.14, jtk-v0.2.0
  • cfl-v0.9.100 through cfl-v0.9.103, cfl-v0.9.13

Fix

In both release-jtk.yml and release-cfl.yml:

  1. 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 }}
  2. Fix Go dependency cache (while we're in the workflow files): add cache-dependency-path to actions/setup-go:

    - uses: actions/setup-go@v5
      with:
        go-version: '1.24'
        cache-dependency-path: tools/jtk/go.sum

    Currently go.sum is at tools/{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 with cfl- prefix

Depends on

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions