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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New release process (release with a manually triggered action) #139

Merged
merged 3 commits into from
Nov 13, 2023

Conversation

shnewto
Copy link
Owner

@shnewto shnewto commented Nov 12, 2023

This PR adds an action that can be manually triggered to handle bumping the Cargo.toml version, adding a corresponding tag to the repo, and publishing to crates.io. The full proposed process is documented in the RELEASE.md that's been added here too.

Some things I thought about then decided against before settling on this solution:

  • We could potentially add another step to the action to actually create a release as well but I opted not to in order to leave some room for the kinds of unautomatable notes that should sometimes make it into a release.
  • We could publish to crates automatically after creating a release manually, but then we end up needing to manually edit the version in the Cargo.toml in order for it to be in the state of code covered in the release's tag. I don't like having to remember to change the version in the Cargo.toml though, it's the part I most often forget and then trip over.

(There are also a couple fixes for clippy lints that made it in here and some fixes to other errors that showed up in CI)

@coveralls
Copy link

Coverage Status

coverage: 96.67% (+0.08%) from 96.589%
when pulling 6c2a925 on publish-crate-action
into 465b797 on main.

@shnewto
Copy link
Owner Author

shnewto commented Nov 12, 2023

Oh something maybe notable in the implementation you might catch: runs-on: macos-latest. This is something I've adopted as a default instead of ubuntu-latest in other crates because I don't have as easy access to an ubuntu machine to troubleshoot issues, and macos-latest also seems to less often need preliminary sudo apt ... steps to pull in extra system dependencies.

- leave the Cargo.toml package version alone :)
- trigger the `tag and publish crate [manual]` action and specify the release increment (major, minor, or patch)
- once the action completes, the Cargo.toml will be updated and the crate will be live on crates.io
- create a release (with title, notes, thanks, etc) and tie it to the tag that was created by the action / new crate version
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this also be handled in the action? or maybe having the github release be manual is a good human checkpoint

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I was thinking exactly that the github release is a good human checkpoint, nice to give a shout out to new contributors or provide links or whatev else, also easy to backfill if we forget it or something too. tho, it might be that that kinda stuff could be added after the fact 🤔 lets see how it goes having it be the human checkpoint 😄

Copy link
Collaborator

@CrockAgile CrockAgile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great README and comments as always 💟

@shnewto shnewto merged commit 67a7054 into main Nov 13, 2023
10 checks passed
@shnewto shnewto deleted the publish-crate-action branch November 13, 2023 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants