Open NonlinearFruit opened 4 months ago
I have no idea how to publish crates. Never done it.
Here are a couple examples:
Starship (workflow)
cargo_publish:
name: Publish Cargo Package
runs-on: ubuntu-latest
needs: [release_please, upload_artifacts]
if: ${{ needs.release_please.outputs.release_created == 'true' }}
steps:
- name: Setup | Checkout
uses: actions/checkout@v4
- name: Setup | Rust
uses: dtolnay/rust-toolchain@stable
- name: Build | Publish
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
mdBook (workflow)
publish:
name: Publish to crates.io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust (rustup)
run: rustup update stable --no-self-update && rustup default stable
- name: Publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --no-verify
And the docs for publishing to crates.io (docs)
This plugin is super helpful. Using it in a CI/CD pipeline is a little rough with the current install steps. Doing a
cargo install
withregister
would be great