Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix homebrew publication #302

Merged
merged 1 commit into from
Oct 5, 2021

Conversation

dduportal
Copy link
Contributor

This PR aims at fixing the homebrew tap publication (ref. https://github.com/updatecli/updatecli/runs/3801471145?check_suite_focus=true#step:10:138) during its initial creation with the v0.8.0 release.

The failure was due to the token GITHUB_TOKEN provided to goreleaser by github actions. This token is able to publish release or packages to the repository updatecli/updatecli, but it does not have any authorization for the repository that should host the homebrew's tap (updatecli/homebrew-updatecli).

This PR defines a second token in goreleaser configuration, only for the homebrew publication.
I've created a PAT for this, and tested it for an initial "manual" release for v0.8.0 and it worked:

brew tap updatecli/updatecli
==> Tapping updatecli/updatecli
Cloning into '/usr/local/Homebrew/Library/Taps/updatecli/homebrew-updatecli'...
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 4 (delta 0), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (4/4), done.
Tapped 1 formula (12 files, 6.7KB).
admin@MacBook-Pro-16-de-Dadou ~ % brew install updatecli      
==> Downloading https://github.com/dduportal/updatecli/releases/download/v0.8.0/updatecli_Darwin_x86_64.tar.gz
==> Downloading from https://github-releases.githubusercontent.com/333694256/eff55370-a4ae-41f1-973b-71fedd2d0334?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20211005%2Fus-east-1%2F
######################################################################## 100.0%
==> Installing updatecli from updatecli/updatecli
馃嵑  /usr/local/Cellar/updatecli/0.8.0: 5 files, 53.7MB, built in 6 seconds
admin@MacBook-Pro-16-de-Dadou ~ % updatecli version

VERSION

Application:	0.8.0
Golang     :	1.17.1 darwin/amd64
Build Time :	2021-10-05T10:29:07Z

admin@MacBook-Pro-16-de-Dadou ~ % which updatecli

But it uses the binaries published on my own fork of updatecli: a new release v0.8.1 is required after this PR (i'm taking care of it)

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
@dduportal dduportal force-pushed the chore/fix-homebrew-publication branch from 6495211 to fb55bb2 Compare October 5, 2021 10:45
@dduportal dduportal requested a review from olblak October 5, 2021 10:46
@dduportal dduportal added the bug Something isn't working label Oct 5, 2021
@olblak olblak merged commit 49c1902 into updatecli:main Oct 5, 2021
@dduportal dduportal deleted the chore/fix-homebrew-publication branch October 5, 2021 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants