goreleaser-action: cannot find GoReleaser latest version

This randomly happened just now:

  check:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Set up Go
        uses: actions/setup-go@v3
        with:
          go-version: 1.16
      - name: Run GoReleaser
        uses: goreleaser/goreleaser-action@v4
        with:
          version: latest
          args: release --snapshot --rm-dist
      - name: Run Tests
        run: go test -v ./...
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Error message:

  Run goreleaser/goreleaser-action@v4
  with:
    args: build --snapshot --single-target --rm-dist
    distribution: goreleaser
    version: latest
    workdir: .
    install-only: false
  env:
    GOPRIVATE: github.com/org/repo
    DOWNLOAD_PACKAGE_TOKEN: ***
    GITHUB_TOKEN: ***
Error: Cannot find GoReleaser latest release

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 11
  • Comments: 18 (12 by maintainers)

Most upvoted comments

We have the same issue in https://github.com/docker/setup-buildx-action/issues/190, GitHub API looks broken šŸ˜ž

btw, wanna leave here public BIG thanks to @crazy-max for getting on top of it šŸ’™

@caarlos0

It could be something related to the URL to get the releaseā€¦

What do you think of replacing this: https://github.com/goreleaser/${distribution}/releases/${resolvedVersion} by this?: https://api.github.com/repos/goreleaser/${distribution}/releases/${resolvedVersion}

do a get on this URL (https://api.github.com/repos/goreleaser/goreleaser/releases/latest), it brings the right list of assets

Thanks so much for taking care of it so fast. šŸ™

@wcmjunior Should be sorted with https://github.com/docker/setup-buildx-action/pull/192

We are going to do the same here

Same issue here. ~Also Iā€™m a bit puzzled at what is the point of me pinning the SHA of the action (and reviewing dependabot updates as needed) but then not getting reproducible builds?~

edit: Sorry for jumping the gun initially, thatā€™s on me for leaving

          version: latest

in the action config itself and I guess nooneā€™s fault if the URL disappeared (well, githubā€™s maybe) - thanks in advance for the quick fixes

@budnieswski yes, that URL worked before thoughā€¦, they just broke it it seems šŸ˜

weā€™re going to do this: https://github.com/docker/setup-buildx-action/pull/191

it seems that github stopped supporting the url we were using to get the releasesā€¦

oh, but we do actually get the ā€œbiggestā€ version number from https://goreleaser.com/static/releases.json , so maybe its downloading from github that was failing?

in this particular case, I think we could use https://goreleaser.com/static/latest insteadā€¦ will see if I can fix it real quick