-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
chore(CI): allow push to crates.io for version tag #53
base: develop
Are you sure you want to change the base?
Conversation
.github/workflows/tests.yml
Outdated
publish: | ||
name: Publish Package | ||
needs: [check, lints, test] | ||
if: startsWith(github.ref, 'refs/tags/v') |
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.
The tags we use for now don't start with v
, so either
- we start using
v{MAJOR}.{MINOR}.{PATCH}
now, or - we match against
refs/tags/
instead
I don't have any strong opinion on the matter.
You might as well create a new workflow file called That would allow (you, me, or someone else) later to add a "check" step that ensures the tag on github matches the version in the Cargo.toml before publishing (it's something that is easy to check and easy to forget, so it's a nice addition to the workflow imo) |
Sounds good. I suggest match against |
I personllay think to safer to run through all test before publish. But might clean the publish workflow to publish related pipeline only. |
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.
No worries there, only blocked by access to repo settings
Current workflow require manual action by @moriturus when publishing new version to crates.io.
This PR enable github action to push new version to crates.io for version tag (e.x.
v0.6.0
,v0.1.2
). With Actions secrets, we can publish to crates.io with token configured before hand without leaking.Now the only missing piece is a valid cargo token. This require repo owner @moriturus to setup secret in repo settings actions secret page(only repo owner can open this link).
I named the cargo token
CARGO_TOKEN
and here is a snapshot of another repo that has correctly setup cargo token in action secrests.Here I call for @moriturus to manually add CARGO_TOKEN to repo setting.
Thanks a lot.