name: Publish to crates.io
on:
push:
tags:
- "v[0-9]*"
permissions:
contents: read
jobs:
publish:
name: cargo publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history so publish-changed.sh can resolve base tag
- uses: dtolnay/rust-toolchain@stable
# Publish changed publishable packages.
# siderust-ffi has publish = false and is skipped automatically.
# Pass --confirm-ffi and protect behind a manual environment for FFI releases.
- name: Publish changed packages
run: bash scripts/publish-changed.sh
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}