name: Publish
# Only a published release, deliberately. There is no manual trigger: it would let
# anyone with write access publish any branch or tag to crates.io, and a crates.io
# release cannot be taken back. A release whose publish failed can be retried with
# "Re-run jobs" on the run, which replays it with the same release event.
on:
release:
types:
- published
permissions:
contents: read
jobs:
publish:
runs-on: windows-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish