-
Notifications
You must be signed in to change notification settings - Fork 8
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
Create a release-commit action #97
base: main
Are you sure you want to change the base?
Conversation
3eaed67
to
ec88056
Compare
This should be created before the "release" github action is run
ec88056
to
ce94853
Compare
- name: Ensure this release doesn't already exist | ||
run: | | ||
if git log --grep="Release ${{ steps.cargo_version.outputs.value }}" --quiet; then |
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.
Is this still necessary if we're checking for an existing tag?
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 think this will cause a false-positive in the event the release got reverted for whatever reason.
If we're trying to determine is whether HEAD is already released, perhaps this will do:
git tag --contains <SHA1>
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'll remove from here because the tag is already checked in the script file. The tags are important though since they are what the changelogs are linking to. The release action tags the commit before it does a binary build. It is possible the binary build fails in some strange case, then we have to manually delete the tag, fix the issue and do a new release. Not necessarily the best way of doing it but it's how it is set up atm. Usually the build doesn't fail if the tests pass though.
scripts/create_release_changes
Outdated
exit 1 | ||
fi | ||
|
||
local current_date=$(date +"%Y-%m-%d") |
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.
Might help to set TZ=UTC
or whatever to explicitly pin a timezone to avoid any surprises.
Co-authored-by: Bez Hermoso <[email protected]>
To create a release, currently a few things should be run before running the "Release" github action (which builds the tinty binaries and publishes the latest version to crates.io). The things that need to be done is:
Cargo.toml
version to a minor or patch version.minor
if there are new additions or breaking changes andpatch
if it's solely a bug fixCargo.toml
version is bumped## Unreleased
to## [x.x.x] - yyyy-mm-dd
and a link added at the bottom of the file to link the diff of[x.x.x]
with the previous versionI usually do this manually but I've made mistakes before and if other people join as maintainers, it's best to automate this process, so that's what this PR does.
I've tested
./scripts/create_release_changes
(bash ./scripts/create_release_changes minor
for example) and it works, but actions are a bit annoying to test so I'm not 100% sure it works. Hopefully something gets caught in the PR, otherwise I'll test it once it's merged and fix anything afterwards.