-
Notifications
You must be signed in to change notification settings - Fork 25
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
Feat/rust cicd #131
Feat/rust cicd #131
Conversation
Thank you for opening/editing this pull request. Please update the models/java/gbfs-java-model/pom.xml version so that your changes will be published. |
Thank you for opening/editing this pull request. Please update the models/rust/Cargo.toml version so that your changes will be published. |
env: | ||
CARGO_REGISTRY_TOKEN: "op://rbiv7rvkkrsdlpcrz3bmv7nmcu/ms6rxv2lhpok44mg32wuihbv7q/credential" |
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 need to add the 1password token to be able to connect with the proper vault:
env: | |
CARGO_REGISTRY_TOKEN: "op://rbiv7rvkkrsdlpcrz3bmv7nmcu/ms6rxv2lhpok44mg32wuihbv7q/credential" | |
env: | |
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
CARGO_REGISTRY_TOKEN: "op://rbiv7rvkkrsdlpcrz3bmv7nmcu/ms6rxv2lhpok44mg32wuihbv7q/credential" |
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.
good catch! OP_SERVICE_ACCOUNT_TOKEN
should already be a secret in this repo
- name: Publish to crates.io | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ env.CARGO_REGISTRY_TOKEN }} | ||
run: cargo publish --token $CARGO_REGISTRY_TOKEN |
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.
Sorry for my lack of knowledge of Rust. Does cargo publish
test and build also? If not, I suggest building and testing before publishing.
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 tests and build are run in the PR check .github/workflows/rust_pr_check.yml
, and yes cargo publish
builds and publishes
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 just looked up cargo publish
also runs tests
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.
LGTM
Add the ability to publish Rust crate for
gbfs_types
as well as PR checks. Modified the readme.Will fail the publish build if the version in Cargo.toml is not changed