-
Notifications
You must be signed in to change notification settings - Fork 96
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: automatically push to crates.io
on release
#462
Conversation
crates.io
on release (wip)crates.io
on release
@plafer I cannot add you as a reviewer since I'm not part of the repo, so tagging you for visibility - ty! |
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.
For this to work, I'd suggest setting up a GitHub bot user of some kind to have owner-level access to this crate on crates.io, and then use that bot account to create an API token and add it as the CRATES_TOKEN
secret here.
We did this with our bftbot user for tendermint-rs.
release.sh
Outdated
# A space-separated list of all the crates we want to publish, in the order in | ||
# which they must be published. It's important to respect this order, since | ||
# each subsequent crate depends on one or more of the preceding ones. | ||
DEFAULT_CRATES="ibc" |
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.
Not sure we need this whole script if only a single package is being published. One could easily, in the workflow file, simply run something like:
cargo publish -p ibc --token ${{secrets.CRATES_TOKEN}}
This script is necessary for tendermint-rs because of the crate interdependencies, and because after publishing a crate and successfully confirming via the crates.io API that the new crate version has been published, subsequent crates that depend on it still fail to be built sometimes for some reason (my guess is that they haven't managed to propagate through the CDN yet).
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 thought this was a good default, but maybe it's best to go for the one-liner indeed
thank you for this PR, I really appreciate it! I'll get to it as soon as I can |
.github/workflows/release.yml
Outdated
# Attempts to perform a release when a particular tag is pushed. This uses the | ||
# release.sh script in the root of the repository, and assumes that the | ||
# CRATES_TOKEN secret has been set and contains an API token with which we can | ||
# publish our crates to crates.io. |
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.
We no longer use the script; can you update this comment accordingly?
CONTRIBUTING.md
Outdated
@@ -272,4 +267,5 @@ Our release process is as follows: | |||
10. Once the tag is pushed, create a GitHub release and append |
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.
In 9. (I can't create a comment for that line), can we add
Pushing the tag will trigger the [Release workflow](https://github.com/cosmos/ibc-rs/actions/workflows/release.yml), which publishes the crate on crates.io.
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.
Also
- From the
crates/ibc
folder, runcargo publish
should be removed
hey @erwanor, if you give me write access to your branch, I'm happy to address the reviews comments |
hey @plafer, sorry was ooo for a bit but I'm back and will review this later today. thanks for reaching out, appreciate it!! |
Please take your time, this was meant to offer help, not rush you :) |
Co-authored-by: Thane Thomson <connect@thanethomson.com> Signed-off-by: Erwan <7871622+erwanor@users.noreply.github.com>
Ok finally got around to address those changes, rebased onto main to fix the conflicts in the contributing docs. Thanks for your patience with this! |
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.
awesome, thanks!
* ci: add deploy script * ci: add `release` workflow * docs(CONTRIBUTING): remove manual `html_root` ver bump * docs(CONTRIBUTING): link the `Release` workflow directly * action: update `.github/workflows/release.yml` Co-authored-by: Thane Thomson <connect@thanethomson.com> Signed-off-by: Erwan <7871622+erwanor@users.noreply.github.com> * ci: remove `release.sh` * actions(release): update comment * docs(CONTRIBUTING): remove old step + describe worfklow --------- Signed-off-by: Erwan <7871622+erwanor@users.noreply.github.com> Co-authored-by: Thane Thomson <connect@thanethomson.com>
Closes: #463
Description
This PR adds a
Release
workflow that gets triggered when a semver-looking tag is pushed tomain
. The workflow focuses on running arelease.sh
script which handles deployingcrates/*
to crates.io. This is porting over work done by @thanethomson intendermint-rs
.PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.