name: crates release
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Require secret
run: |
if [ -z "$CARGO_REGISTRY_TOKEN" ]; then
echo "::error::CRATES_TOKEN secret not configured (org Settings - Secrets - Actions)"
exit 1
fi
- run: cargo test
- run: cargo publish --allow-dirty # test run bumps Cargo.lock's own version; harmless