name: Publish to crates.io
on:
workflow_dispatch: # Trigger this workflow manually
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout the repository
uses: actions/checkout@v2 # Checkout the repository to the runner
- name: Update local toolchain
run: |
rustup update
- name: Toolchain info
run: |
rustup --version
- name: Publish to crates.io
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} # Publish the crate to crates.io