name: Release

on:
  push:
    tags: ["v*"]

jobs:
  publish:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable

      - name: Verify tag matches Cargo.toml version
        run: |
          CARGO_VER=$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)"/\1/')
          TAG_VER="${GITHUB_REF_NAME#v}"
          echo "Cargo.toml: $CARGO_VER, tag: $TAG_VER"
          if [ "$CARGO_VER" != "$TAG_VER" ]; then
            echo "ERROR: tag $TAG_VER != Cargo.toml $CARGO_VER"
            exit 1
          fi

      - name: Build and test
        run: |
          cargo fmt --all -- --check
          cargo clippy --workspace -- -W warnings
          cargo build --release --workspace
          cargo test --workspace
          cargo run --example vecadd
          cargo run --example matmul

      - name: Publish to crates.io
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
        run: cargo publish --no-verify

      - name: Create GitHub Release
        env:
          GH_TOKEN: ${{ github.token }}
        run: |
          gh release create "$GITHUB_REF_NAME" \
            --title "$GITHUB_REF_NAME" \
            --generate-notes

Homonyms

soft3/radio/.github/workflows/release.yml
soft3/radio/iroh-ffi/.github/workflows/release.yml
soft3/radio/iroh-willow/.github/workflows/release.yml
cyb/honeycrisp/rane/.github/workflows/release.yml
cyb/honeycrisp/.claude/worktrees/agent-ad6c77c38e86bc291/rane/.github/workflows/release.yml
cyb/honeycrisp/.claude/worktrees/agent-aa1259cb10112b22a/rane/.github/workflows/release.yml
cyb/honeycrisp/.claude/worktrees/agent-ad6c77c38e86bc291/aruminium/.github/workflows/release.yml
cyb/honeycrisp/.claude/worktrees/agent-aa1259cb10112b22a/aruminium/.github/workflows/release.yml

Graph