-
Notifications
You must be signed in to change notification settings - Fork 14
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
ci: automate creation of GitHub releases and tags #235
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.
Conceptually seems right but I'll leave to those who have done hands-on releasing here to approve like @rjan90 or @rvagg or @Stebalien.
Also, for the record this addresses some of #181 , but it isn't handling artifact creating/publishing (as called out in the PR description).
.github/workflows/release-check.yml
Outdated
"dispatch_examples/greeter/Cargo.toml", | ||
"frc42_dispatch/Cargo.toml", | ||
"frc42_dispatch/hasher/Cargo.toml", | ||
"frc42_dispatch/macros/Cargo.toml", | ||
"frc42_dispatch/macros/example/Cargo.toml", | ||
"frc46_token/Cargo.toml", | ||
"frc53_nft/Cargo.toml", | ||
"fvm_actor_utils/Cargo.toml", | ||
"fvm_dispatch_tools/Cargo.toml", | ||
"testing/integration/Cargo.toml", | ||
"testing/test_actors/Cargo.toml", | ||
"testing/test_actors/actors/basic_nft_actor/Cargo.toml", | ||
"testing/test_actors/actors/basic_receiving_actor/Cargo.toml", | ||
"testing/test_actors/actors/basic_token_actor/Cargo.toml", | ||
"testing/test_actors/actors/basic_transfer_actor/Cargo.toml", | ||
"testing/test_actors/actors/frc46_factory_actor/Cargo.toml", | ||
"testing/test_actors/actors/frc46_test_actor/Cargo.toml", | ||
"testing/test_actors/actors/frc53_test_actor/Cargo.toml", | ||
"testing/test_actors/actors/frc46_factory_token/token_impl/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.
This set of files is duplicated 4 times across 2 files. Is there a way to factor it out to one place?
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.
Unfortunately, that isn't that straighforward.
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.
Ack - bummer. I guess this in part because GitHub Actions doesn't support YML anchors?
Maybe for now just add a comment that any changes here should also be made in releaser.yml (and vice versa)
Same for Is this reasonable and OK? I have to defer to @Stebalien || @anorth on what we expect to be released from here. |
@rvagg thanks for the note. I took the list of packages we might want handled from Line 3 in c2e3fcd
Also, as per the description, this doesn't handle cargo publishing at the moment. The most straightforward way to handle that would be to follow a similar flow to what we proposed in - filecoin-project/builtin-actors#1571 (comment) There, the post-GitHub Release publishing step is to upload assets to the release; here, it could be to perform cargo publishing. |
Looking at this more, I think we need @Stebalien input. I'll point him at this. On the surface, I would assume we should just tag what has previously been tagged. Looking at https://github.com/filecoin-project/actors-utils/tags, that appears to be: I also see this repo hasn't traditionally created GitHub releases: https://github.com/filecoin-project/actors-utils/releases . I don't know if that's intentional or not. |
Yes, I think that would be the right place to start. Tagging/releasing/publishing crates only used for testing doesn't seem helpful. |
Yeah, two bits of feedback:
Note: the
We have been publishing those as |
I now limited the list of packages that are to be released with the automation and also updated the separtor to "@" so the packages will be tagged as Here's the current list of config files that will be looked at:
|
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.
This works but it requires duplicating information already present in the Cargo.toml
files, which is unfortunate. Is there any way to extract this information from those files?
If that's difficult, having a single list of "released" crates would likely be good enough, especially if we can code-gen it.
2024-08-01 conversation between IPDX and FilOz: @galargh will incorporate comments week of 2024-08-05 so we can get this merged. |
I applied the requested changes in 58afb97. I'll now proceed to add a similar commit to the PR in |
@Stebalien : I believe this is ready for your review again. @galargh : can you add a README section about the release process like we have in some of the repos so it's clear to someone about the set of steps to take? Something like:
(I don't know if the above is accurate.) Or drop me a couple of notes and I can happily do it. I'm actually confused what how much of the release process is manual vs. automated, especially since this repo doesn't have GitHub Releases. I assume I'm just missing things given being tired and having confusion compared to the other recent Rust repos we've been touching. |
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.
As far as this goes, it seems reasonable but won't actually be useful until we can:
- Publish on release.
- Perform a dry-run before releasing.
Just double checking: the tags are now I see it is.crate_name@version
?
Yes, agreed 💯 I described the process proposed here and future improvements in e4daf65. I think we should decide whether the partial automation is useful for this repo or we should wait until we can also fully automate the |
Pull Request Test Coverage Report for Build 10383821682Details
💛 - Coveralls |
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 for documenting. This seems better than what we had before in that have more docs and a few less manual steps. I'll let @Stebalien make the call whether this is worth it or not though.
2. Check if a git tag for the version, using the `crate_name@version` as the pattern, already exists. Continue only if it does not. | ||
3. Create a draft GitHub release with the version as the tag. | ||
4. Comment on the pull request with a link to the draft release. | ||
2. **[MANUAL]** Run `cargo publish --dry-run` for each crate that is proposed to be released in the reverse dependency order. |
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.
How does someone find the reverse dependency order?
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.
And how does this get done for the crate? we have a workspace here so do we need to -p
to do this or do we cd
into the directory to run this? I'm not clear on how publishing on workspaces works so this is a bit of a mystery to me.
Co-authored-by: Steve Loeppky <stvn@loeppky.com> Co-authored-by: Rod Vagg <rod@vagg.org>
Closing this PR for identical reasons to filecoin-project/ref-fvm#2027 (comment) . Bummer :( For next network upgrade, nv24, if the situation hasn't improved, we'll have someone like @rjan90 or @BigLep watch @Stebalien and capture the manual steps that are covered so we at least document the current manual release process better. We'll also make sure that others have access to publish by adjusting https://crates.io/crates/fvm_actor_utils and getting filecoin-project/github-mgmt#58 landed. |
(Turns out I don't permission to close this.) |
Same as in filecoin-project/ref-fvm#2027 (comment), thank you all for your time and knowledge - truly appreciated 🙇 |
This automates the creation of GitHub releases and associated GitHub tags based on the changes to the version in the Cargo.toml files across the repo. The tags will be prefixed with the directory in which the Cargo.toml file is. For example, changing the version in
dispatch_examples/greeter/Cargo.toml
will createdispatch_examples/greeter/${VERSION}
tag.The automation uses the same principles as the one you might know from Go projects where we control the current version via version.json file (https://github.com/ipdxco/unified-github-workflows?tab=readme-ov-file#versioning). This is the exact same workflow just updated to workflow with Cargo.toml.
Note, that the automation doesn't take care of cargo publishing currently.