Skip to content

Publish Rust Library to crates.io #10

Publish Rust Library to crates.io

Publish Rust Library to crates.io #10

Workflow file for this run

name: Publish Rust Library to crates.io
on:
push:
tags:
- 'v*.*.*' # Match semantic version tags
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: cargo login
run: cargo login ${{ secrets.CARGO_TOKEN }}
# Step 4: Publish the library
- name: Publish Library to crates.io
run: |
cd ic/libraries
cargo publish --allow-dirty --no-confirm