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)
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 š
successfully run a release just now: https://github.com/caarlos0/goreleaser-action-v4-auto-snapshot-example/actions/runs/4029341069/jobs/6927878915
okay just released https://github.com/goreleaser/goreleaser-action/releases/tag/v4.1.1
@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
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