on:
    push:
        # Pattern matched against refs/tags
        tags:
            - "v*"

name: Publish

jobs:
    publish:
        name: Publish
        runs-on: ubuntu-latest
        steps:
            - name: Checkout sources
              uses: actions/checkout@v4

            - name: Install stable toolchain
              uses: dtolnay/rust-toolchain@stable

            - run: cargo publish --token ${CRATES_TOKEN}
              env:
                  CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
