-
Notifications
You must be signed in to change notification settings - Fork 284
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
Automate releases using GHA #517
Conversation
To publish a release, we currently have to run `make docker-run-release` locally after tagging a release, which is not a huge effort but a bit cumbersome, because we do it only a few times a year and that is long enough to lose my memory :) Starting this change, we use a GHA workflow to automatically build and publish binaries whenever a new semver tag is created, so that we do not need to run `make` anymore.
.github/workflows/release.yaml
Outdated
name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.20.12' |
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'd rather use go-version-file: 'go.mod'
You don't need to update workflow in case of go patch version bump.
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.
good idea.
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.
Updated in 6ab9a0b. Thank you very much for the suggestion
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.
LGTM
To publish a release, we currently have to run
make docker-run-release
locally after tagging a release, which is not a huge effort but a bit cumbersome because we do it only a few times a year and that is long enough to lose my memory :)Starting this change, we use a GHA workflow and goreleaser to automatically build and publish binaries whenever a new semver tag is created, so that we do not need to run
make
anymore.I crafted the goreleaser configuration so that it produces the same archives that we use and helm-diff's install.sh relies on.
For example, the produced archives has contents like the below:
bin/diff
is especially important because that's the path we use in the plugin.yaml.You can test this almost locally, by running
goreleaser --snapshot --clean
. Whenever you modify.goreleaser.yml
, I'd recommend you running that for verification.I bootstraped this from my other projects. But the end result turned out to be almost the same as @bonddim's awesome PR #480 submitted last July(!) so big applause to @bonddim for his awesome work!