axodotdev / axodotdev/cargo-dist
publish-job: crates.io
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 149
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 32
Description
Add a builtin publish-job for uploading to crates.io, in the same vein as the homebrew one.
Use this as a template: https://github.com/axodotdev/cargo-dist/blob/main/.github/workflows/publish-release.yml
(If there's a predefined "publish to crates.io action" that does what we want it's fine to use that instead)
Notes:
* do the `publish_prerelease == true` check that publish-homebrew does
* need to select dependent libraries in the workspace to publish based on the packages to publish, and publish them in order
* some may already be published, that's ok
* user needs to set `secrets.CRATES_TOKEN` for us to use in `env: CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}`
* may want to support publishing to [alternative registries from crates.io](https://doc.rust-lang.org/cargo/reference/registries.html)
* do not need to be responsible for bumping versions, cargo-dist currently assumes that's already done
Contributor guide
Research direction
Start by comparing the requested job with the Homebrew publishing job and the template in .github/workflows/publish-release.yml. Trace how workspace packages and their dependencies are selected, then define completion as publishing eligible packages in dependency order, honoring publish_prerelease, CRATES_TOKEN, and any supported registry configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- release
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100