Publish to crates.io from GitHub releases - #11
Merged
Merged
Conversation
Publishing a GitHub release now runs a Release workflow. The Package job checks that the tag points to a commit on main and matches every crate version (v0.1.0 for 0.1.0), then runs cargo publish --workspace --dry-run. The Publish job waits in the crates-io environment, which requires the maintainer's approval and accepts only v* tags, before it runs cargo publish --workspace. cargo publish --workspace publishes shimforge-macros before shimforge. The crates.io token is an environment secret, so the job can read it only after approval. The Package job also runs on pull requests that change the manifests or this workflow, so a package that cannot be published fails in review. It is not a required check.
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.
Adds a Release workflow that publishes both crates to crates.io.
Publishing a GitHub release checks that the tag is on
mainand matches the crate versions, runs a dry run, and publishes after approval in thecrates-ioenvironment. The dry run also runs on PRs that change the manifests.