goreleaser / goreleaser-action

GitHub Action for GoReleaser
https://github.com/marketplace/actions/goreleaser-action
MIT License
865 stars 78 forks source link

cannot find GoReleaser latest version #389

Closed till closed 1 year ago

till commented 1 year ago

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
graytonio commented 1 year ago

I just had the same issue

graytonio commented 1 year ago

Trying to fix to a version also appears broken

- uses: goreleaser/goreleaser-action@v4
    with:
      distribution: goreleaser
      version: v1.14.1
      args: release --rm-dist
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
    distribution: goreleaser
    version: v1.1[4](https://github.com/graytonio/zoltan-bot/actions/runs/4029061823/jobs/6926570684#step:6:4).1
    args: release --rm-dist
    workdir: .
    install-only: false
  env:
    GITHUB_TOKEN: ***

Error: Cannot find GoReleaser v1.14.1 release
crazy-max commented 1 year ago

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

caarlos0 commented 1 year ago

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

caarlos0 commented 1 year ago

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?

caarlos0 commented 1 year ago

Error: Cannot find GoReleaser v1.14.1 release

yeah looks like

caarlos0 commented 1 year ago

def something on github, action tests were passing up to 15h ago (the failures are because I rotated a key and forgot to change here, just fixed it)... and now they don't pass anymore...

caarlos0 commented 1 year ago

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...

budnieswski commented 1 year ago

@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

caarlos0 commented 1 year ago

btw, wanna leave here public BIG thanks to @crazy-max for getting on top of it 💙

caarlos0 commented 1 year ago

@budnieswski yes, that URL worked before though..., they just broke it it seems :|

wcmjunior commented 1 year ago

@caarlos0 , seems like the fix proposed in https://github.com/docker/setup-buildx-action/pull/191 brings some implications for GH enterprise. Just a heads up in case you are not following the thread in real time. :)

ldemailly commented 1 year ago

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

crazy-max commented 1 year ago

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

We are going to do the same here

caarlos0 commented 1 year ago

ight me and @crazy-max got #390 ready (probably)

caarlos0 commented 1 year ago

okay just released https://github.com/goreleaser/goreleaser-action/releases/tag/v4.1.1

caarlos0 commented 1 year ago

successfully run a release just now: https://github.com/caarlos0/goreleaser-action-v4-auto-snapshot-example/actions/runs/4029341069/jobs/6927878915

till commented 1 year ago

Thanks so much for taking care of it so fast. 🙏