-
Notifications
You must be signed in to change notification settings - Fork 781
CI: Add a release preparation and release workflow #1559
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
Conversation
|
Ooohh, from Rust 1.90.0 release: Cargo adds native support for workspace publishingcargo publish --workspace is now supported, automatically publishing all of the crates in a workspace in the right order (following any dependencies between them). This has long been possible with external tooling or manual ordering of individual publishes, but this brings the functionality into Cargo itself. Native integration allows Cargo's publish verification to run a build across the full set of to-be-published crates as if they were published, including during dry-runs. Note that publishes are still not atomic -- network errors or server-side failures can still lead to a partially published workspace. |
|
I'm currently adjusting the release workflow to use that new info. How does that interact with crates that generate code and need |
# Conflicts: # CHANGELOG.md # Cargo.toml
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.
Pull Request Overview
This PR replaces the existing manual shell script publishing workflow with an automated GitHub Actions-based release process. The new system separates release preparation from the actual publishing, providing better control and automation.
Key changes:
- Removes the old
publish.shscript and replaces it with GitHub Actions workflows - Transitions from workspace-based versioning to individual crate versioning for 0.7.1
- Introduces a two-step release process: preparation via manual workflow, then publishing via release creation
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| publish.sh | Removes the legacy bash publishing script |
| */Cargo.toml | Updates all crates to use explicit version "0.7.1" instead of workspace version |
| PUBLISHING.md | Updates documentation to describe the new GitHub Actions-based release workflow |
| .github/workflows/release.yml | Adds automated workflow for publishing crates when a GitHub release is created |
| .github/workflows/prepare-release.yml | Adds manual workflow for preparing releases with version bumping and changelog updates |
| .github/workflows/build.yml | Removes publish.sh from ignored paths since it no longer exists |
| .github/scripts/bump-versions.sh | Adds script for intelligent version bumping based on changed crates |
| .github/example/prepare-release.event | Adds example event file for testing the prepare-release workflow |
| CHANGELOG.md | Minor formatting fix to use angle bracket URL format |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
I tested the workspace publishing with a dry-run for a patch version and that seemed to work quite well. So I adjusted the release workflow to use that, as it reduces a lot of unnecessary complexity |
|
What's the current state? You think we could try next release with it? 🤞 Edit: asking because I saw more than a few review comments as not resolved yet. |
|
I think I did go over every comment of yours and changed/adjusted the code or added a comment to it explaining why I would like it to be as is. |
|
I can look over this tomorrow eve, if that's helpful. |
|
@roderickvd @kingosticks Anything that requires doing on this PR? Otherwise we could use this for the next minor version release then? |
|
Would be great to give it the shot! Next release should be v0.8.0 no? Because of the various breaking changes to the API. |
|
Yeah, 0.8 would be the next version. I just now resolved all open discussion. The next version will be interesting as the protocol will be updated too and we don't provide the
|
|
To use the workflow we still need to add a secret to the repository named When that is done, I would merge this PR and see how good it works for 0.8 if no one has a problem with that? |
|
OK, I've added an |
|
So first issue encountered. The action can't automatically commit on |
|
I added the maintain role to the ruleset, which can now bypass the restriction on all branches. That should probably be fine? |
|
Hmm, those ruleset settings are quite annoying. Even tho I added myself via a group to a bypass list, it doesn't bypass the ruleset... And I don't want to disable the PR required rule as it seems quite important to have. |
I think this is in a reviewable state now, where we can discuss over the details.
The idea behind the release flow is described in
PUBLISHING.md. But broken down, there is a manual workflow that takes care of the manual preparation steps and a automatic workflow that is triggered when a github release is created (onlycreatedbecause we want to create a draft and only publish when the workflow is done).Disclaimer: