Publish to Crates.io #6
Workflow file for this run
This file contains 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
name: Publish to Crates.io | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
environment: Crates.io | |
name: Publish Rust crate | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup | Rust | |
run: | | |
rustup toolchain install stable --profile minimal | |
rustup default stable | |
- name: Package and publish crate | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} | |
run: | | |
cargo publish |