-
Notifications
You must be signed in to change notification settings - Fork 95
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 #401
Automate releases #401
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.
Oops, adding a few typo fixes as review suggestions so that I can apply them from UI.
Codecov Report
@@ Coverage Diff @@
## main #401 +/- ##
==========================================
- Coverage 67.82% 67.82% -0.01%
==========================================
Files 75 75
Lines 7777 7786 +9
==========================================
+ Hits 5275 5281 +6
- Misses 1819 1821 +2
- Partials 683 684 +1
Continue to review full report at Codecov.
|
Also fixes go install since we had replace directives in version bump commit. Those are now in a separate commit that moves module back to development mode. And also makes versions a bit more robust by passing them as env vars. This allows us to properly escape them in shell commands.
Go get, uh, gets confused if go.mod contains non-existent version. That’s the case with current go.mod file.
Testing release.yaml workflow now by changing the import path and creating a new release in a separate repository.
|
Looks like gorelease silently ignores replace directive. I’ll add a rollback strategy and run gorelease for badgerengine in a separate job after tagging root module. |
This ensures that go.mod is always valid so that go get won’t be confused by non-existent v0.0.0-devel version.
This should fix release page not showing commits made after release.
@asdine should be ready for review. |
Thanks @tie ! I will review ASAP |
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 @tie ! Sorry for the delay
I don't know much about Github Actions so I don't have much to say about the manifests and I trust your expertise. (cc @jhchabran perhaps you know more than me, if you want to have a look)
@tie could you add a README explaining how to create a release? Otherwise I'm sure I'll forget the minute I merge the PR 😆
This looks good ! would you be able to add the tinygo wasm target into the matrix ? |
@tie That's a lot of good work you poured into making this work! And those things are not fun to debug either, thank you so much for taking the time to make it work. I experimented with the process and it works really nicely. AFAIU, with this PR the development process becomes the following:
So that means, we'd be stuck with https://github.com/genjidb/genji/pull/401/files#diff-f94dd260d5f8f1b19caefcdfefe9ad1ab0cdfc040cd655cc82367b6950da9a0dR9 "forever" unless we rebase the ➡️ I don't think that's an issue, but I just wanted to be 100% sure I understand how we should handle the Short feedback on minor things: ➡️ Optionally, what about zipping the binaries assets from the build matrix before uploading them on GH? ➡️ PS: thanks for taking the time to write this comment, it saved me some time 😊 #401 (comment) ! |
@tie Zipping things aside which is not important, could you just confirm what is the expected flow with the release branch? |
After discussing with @asdine, we have decided to not merge this pull-request. This decision has nothing to do with the quality of your contribution, which is absolutely great! ➡️ What motivates our decision is that at this stage, Genji is still small and we aren't releasing often enough to justify adding an automated release mechanism and having to own that particular code. I'll keep a bookmark to this PR because it's a great example of what can be achieved with Github actions. I hope this come out as not too disappointing due to how much energy was invested here. |
This PR automates publishing new releases.
To publish a new release, just
git push release
. The new version is automatically inferred based on API changes.Alternatively, it’s possible to override this behavior (e.g. if we have breaking changes in cmd/genji but not in Go API) by pushing to
release-v0.13.0
branch, or manually dispatching a workflow with version inputs.The workflow then creates version bump commits for Genji’s submodules and tags them. In the end it creates a draft release with changelog (additionally using
CHANGELOG.md
if it exists). When GitHub release is published, another CI workflow kicks in that builds and uploads binaries as release assets.Additionally, version bump commits are only reachable from tags so it should be safe to dispatch the workflow on main branch.
That said, this should also eliminate the need to manually manage unreleased versions in
go.mod
.Build matrix
Closes #269