-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for GitHub Actions and goreleaser #604
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making these changes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're getting close to merging this. What are your thoughts/plans for testing? Do you still have a draft of the changelog?
.github/workflows/release.yaml
Outdated
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- run: echo "::set-env name=SOURCE::$(make echo-source)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know about workflow commands!
It looks like set-env
is deprecated for security reasons. Use $GITHUB_ENV
or a step output instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, nice catch! Fixing it right now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used $GITHUB_ENV
for the fix, it should be good to go. If you find something else, please let me know so I can fix it and we can get this up and running.
I can do a fork and test it with some test accounts.
Yes, I still have it. |
I already tested it (as I started my PR based on those tests). The only big change is the "single source of truth". And we could still test it by creating a v4.14.2-alpha.1 version first, and if it succeeds then go for the v4.14.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can test with beta.1
and once release are build properly, we can release a non-prerelease.
I hope specifying beta.X
in the tag doesn't break downstream services like package cloud and docker hub...
Resolves #546 , resolves #74
What it does?
It adds a workflow for GitHub actions, which is going to trigger on new tags pushed to the repository.
Steps
ruby/setup-ruby@v1
: required for successful gem install of the package_cloud toolactions/setup-go@v2
: to setup the wanted go versiondocker/setup-qemu-action@v1
anddocker/setup-buildx-action@v1
for the multi-arch builddocker/login-action@v1
to login to Docker Hubwindows
,darwin
andlinux
migrate/migrate:latest
:linux/amd64
andlinux/arm64
migrate/migrate:{{ .Major }}
:linux/amd64
andlinux/arm64
migrate/migrate:{{ .Tag }}
:linux/amd64
andlinux/arm64
migrate/migrate:{{ .Tag }}-amd64
:linux/amd64
migrate/migrate:{{ .Tag }}-arm64
:linux/arm64
Note: tried to push images without the
-amd64
and-arm64
images, but couldn't make it work, maybe in another PR in the future.TODOs:
The workflow requires 3 secrets to be set
PACKAGECLOUD_TOKEN
: which is the token for Package Cloud to be able to push new packagesDOCKERHUB_USERNAME
: the username of the docker hub user, if I'm right, it'sgolangmigrate
for usDOCKERHUB_TOKEN
: which is a personal access token for the user we use to push the imagesAfter each release / tag, someone will need to (potentially alter the notes and) publish the draft release created by GoReleaser.
Thank you @johejo for the initial work (#570 )!