name: release
# Publishes cargo-affected to crates.io when a version tag is pushed.
# Requires the `CARGO_REGISTRY_TOKEN` repo secret to be set.
on:
push:
tags:
- '**[0-9]+.[0-9]+.[0-9]+*'
jobs:
publish-cargo:
runs-on: ubuntu-24.04
environment: release
steps:
- uses: actions/checkout@v6
- name: Publish to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --package cargo-affected