chore: prepare barretenberg-rs for crates.io publishing#20496
Open
johnathan79717 wants to merge 3 commits intomerge-train/barretenbergfrom
Open
chore: prepare barretenberg-rs for crates.io publishing#20496johnathan79717 wants to merge 3 commits intomerge-train/barretenbergfrom
johnathan79717 wants to merge 3 commits intomerge-train/barretenbergfrom
Conversation
Collaborator
|
I'm opposed to this. this is how people get messy PR diffs and end up having to ask if they're messing something up |
Add `include` to Cargo.toml so that the generated api.rs and generated_types.rs are included in the published crate package even though they remain gitignored. This way the crate is self-contained on crates.io without committing generated files to the repo. Also add `publish = false` to the tests crate.
b00d10e to
e2ffe4a
Compare
Manual workflow_dispatch that downloads the bb binary from a GitHub release, generates the Rust bindings, sets the crate version, and publishes to crates.io.
Contributor
Author
I uncommitted those files. |
The workflow now triggers on `release: published` and skips pre-releases (nightlies, RCs, spartan). Manual workflow_dispatch is kept as a fallback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
includefield to barretenberg-rsCargo.tomlso generatedapi.rsandgenerated_types.rsare included in the published crate, even though they remain gitignoredpublish = falseto the tests cratepublish-barretenberg-rs.ymlworkflow that auto-publishes to crates.io on non-prerelease GitHub releases (with manualworkflow_dispatchfallback)How it works
includefield inCargo.tomloverrides.gitignoreforcargo publish, so the files are packaged as long as they exist on diskbbbinary from the matching release, runsyarn generateto create the Rust bindings, sets the crate version, and publishesprereleasefilter)Test plan
cargo package --list --allow-dirtyconfirmssrc/api.rsandsrc/generated_types.rsare includedcargo publish --dry-run --allow-dirty --no-verifysucceeds (14 files, 171KB)BARRETENBERG_CRATES_IO_TOKENsecret in repo settings before first real publish