Repository navigation
ci: publish crate to crates.io on release - #21
Merged
Merged
Conversation
Dependabot treats the toolchain ref as an action version and bumps it to a nonexistent tag (e.g. 1.99.0 -> 1.120.0), which breaks the install step. Ignore that dependency so the bogus PRs stop being opened.
Add a publish job to the Release workflow that runs `cargo publish` using the CARGO_REGISTRY_TOKEN secret when a v* tag is pushed. Also fix the crate metadata (repository URL, keywords, categories) and exclude non-crate files from the published package.
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.
Description
Set up crates.io publishing so release-please releases also push to crates.io:
publishjob to the Release workflow that runscargo publish --lockedwithCARGO_REGISTRY_TOKENwhen av*tag is pushed (guarded byif: startsWith(github.ref, 'refs/tags/v')).repositoryURL (→DEVtheOPS/gsbt), addskeywords/categories, andexcludes non-crate files (.github,docs, tooling files) from the published package.dtolnay/rust-toolchainso that fix lives onmain(not only on the release branch).Verified with
cargo publish --dry-run: packages 39 files and builds cleanly.Type of change
Checklist
CONTRIBUTING.mdcargo publish --dry-runpasses locallyHow it works
Merge this → release-please updates the 0.3.0 release PR (#17) to include it → merging #17 tags
v0.3.0→ the Release workflow builds the binaries and publishesgsbt 0.3.0to crates.io.