goreleaser / goreleaser-action

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

fix: don't depend on the GitHub API to check release #391

Closed crazy-max closed 1 year ago

crazy-max commented 1 year ago

follow-up https://github.com/docker/buildx/pull/1563

We are currently using the GitHub API to check for latest and tagged releases to make sure they exist before download. But this requires using a token to avoid rate-limit. It's fine for public runners but GHES runners don't have the github.token populated automatically (see https://github.com/docker/setup-buildx-action/issues/194). They need to create a PAT.

We actually don't need to use the GitHub API at all as we have the list of releases available:

codecov[bot] commented 1 year ago

Codecov Report

Merging #391 (7315d07) into master (9754a25) will increase coverage by 2.23%. The diff coverage is 83.87%.

@@            Coverage Diff             @@
##           master     #391      +/-   ##
==========================================
+ Coverage   64.95%   67.18%   +2.23%     
==========================================
  Files           3        3              
  Lines         117      128      +11     
  Branches       18       22       +4     
==========================================
+ Hits           76       86      +10     
+ Misses         28       27       -1     
- Partials       13       15       +2     
Impacted Files Coverage Δ
src/context.ts 83.33% <ø> (ø)
src/github.ts 81.13% <82.75%> (-1.37%) :arrow_down:
src/goreleaser.ts 55.07% <100.00%> (+1.55%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

crazy-max commented 1 year ago

@caarlos0 I don't think it's necessary. Introducing github_token should have been a v4 but we are going back to what we had before so I think it's fine to create a minor release.

caarlos0 commented 1 year ago

@caarlos0 I don't think it's necessary. Introducing github_token should have been a v4 but we are going back to what we had before so I think it's fine to create a minor release.

ah, right

lgtm then :D

crazy-max commented 1 year ago

Oh sorry I misunderstood, I thought you were saying a new major (v5) so yeah we shoud do a release

crazy-max commented 1 year ago

v4.2.0 and v4

caarlos0 commented 1 year ago

Oh sorry I misunderstood, I thought you were saying a new major (v5) so yeah we shoud do a release

I was, but misstyped 😂

all good, your argument makes 100% sense and this seems like the way to go!