goreleaser / goreleaser-action

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

How to re-run without re-releasing? #371

Closed mholt closed 2 years ago

mholt commented 2 years ago

Hi, we're trying to release Caddy v2.6.1 but the release job failed because a binary took more than 30m to build (I noticed it running pretty slowly today in general):

https://github.com/caddyserver/caddy/actions/runs/3100438200/jobs/5020719987

I'm wondering how we can:

1) Remove or extend the timeout 2) Re-run the release job without re-releasing

I'm not very well versed in GitHub actions / goreleaser so I thought I'd ask here. Thanks for any advice!

Here's our release script: https://github.com/caddyserver/caddy/blob/master/.github/workflows/release.yml

mholt commented 2 years ago

Wait, @Mohammed90 just clued me in that GitHub now has a "Re-run jobs" button. And that it should be safe to re-run release jobs.

We're trying that now. If that works, That worked after a few retries, so ignore question 2. :smile: Still wondering about that timeout option though!

caarlos0 commented 2 years ago

Hey @mholt !

  • Remove or extend the timeout

there's a timeout flag in the release command: https://goreleaser.com/cmd/goreleaser_release/

so, using the action, you can:

      -
        name: Run GoReleaser
        uses: goreleaser/goreleaser-action@v3
        with:
          # either 'goreleaser' (default) or 'goreleaser-pro'
          distribution: goreleaser
          version: latest
          args: release --rm-dist --timeout 60m # <------ HERE :) 
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
          # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}

I'm not aware if github actions et al have a timeout as well though...

  • Re-run the release job without re-releasing

yep, just re-run the job in the github actions UI, it should work :)

mholt commented 2 years ago

Thank you so much, it wasn't clear to me how to set that in the action.

Thanks for GoReleaser!