fix: cross-platform signal handling in watcher (Windows ctrl_c) #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build | |
| run: cargo build --workspace | |
| - name: Test | |
| run: cargo test --workspace | |
| - name: Clippy | |
| run: cargo clippy --workspace -- -D warnings | |
| publish: | |
| needs: test | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Check tag matches workspace version | |
| run: | | |
| TAG_VERSION="${GITHUB_REF_NAME#v}" | |
| MANIFEST_VERSION="$(sed -n 's/^version = "\(.*\)"$/\1/p' Cargo.toml | head -n 1)" | |
| if [ -z "$MANIFEST_VERSION" ]; then | |
| echo "::error::no version found in [workspace.package] of Cargo.toml" | |
| exit 1 | |
| fi | |
| if [ "$TAG_VERSION" != "$MANIFEST_VERSION" ]; then | |
| echo "::error::tag $GITHUB_REF_NAME does not match workspace version $MANIFEST_VERSION" | |
| exit 1 | |
| fi | |
| echo "Publishing kqs $MANIFEST_VERSION" | |
| # Publish in dependency order; each `cargo publish` verifies the package | |
| # against the registry, so dependents can only be published once their | |
| # deps are live. | |
| - name: Publish kq-config | |
| run: cargo publish -p kq-config | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| - name: Publish kq-llm | |
| run: cargo publish -p kq-llm | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| - name: Publish kq-embeddings | |
| run: cargo publish -p kq-embeddings | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| - name: Publish kq-core | |
| run: cargo publish -p kq-core | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| - name: Publish kqs | |
| run: cargo publish -p kqs | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |