test crate publisher workflow #3
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 Rust Library to crates.io | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the repository | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
# Step 2: Install Rust toolchain | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable # Use the stable Rust version | |
override: true | |
- name: Setup crates.io Credentials | |
run: | | |
echo "[registries]" > $HOME/.cargo/credentials | |
# echo "token = \"${{ secrets.CARGO_TOKEN }}\"" >> $HOME/.cargo/credentials | |
# Step 4: Publish the library | |
- name: Publish Library to crates.io | |
run: | | |
cd ic/libraries | |
cargo publish --allow-dirty |