feat: add Cursor CLI hooks integration #11
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| verify: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Verify version matches tag | |
| env: | |
| TAG_NAME: ${{ github.ref_name }} | |
| run: | | |
| CARGO_VERSION=$(grep '^version' Cargo.toml | head -1 | cut -d'"' -f2) | |
| TAG_VERSION=${TAG_NAME#v} | |
| echo "Cargo.toml version: $CARGO_VERSION" | |
| echo "Tag version: $TAG_VERSION" | |
| if [ "$CARGO_VERSION" != "$TAG_VERSION" ]; then | |
| echo "::error::Version mismatch! Cargo.toml=$CARGO_VERSION, tag=$TAG_VERSION" | |
| exit 1 | |
| fi | |
| echo "β Version matched" | |
| build: | |
| needs: verify | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| name: veto-x86_64-apple-darwin | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| name: veto-aarch64-apple-darwin | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| name: veto-x86_64-unknown-linux-gnu | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| name: veto-aarch64-unknown-linux-gnu | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.target }} | |
| - name: Install cross-compilation tools (Linux ARM) | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-aarch64-linux-gnu | |
| echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> "$GITHUB_ENV" | |
| - name: Build | |
| run: cargo build --release --target "$TARGET" | |
| env: | |
| TARGET: ${{ matrix.target }} | |
| - name: Package | |
| run: | | |
| cd "target/${TARGET}/release" | |
| tar -czvf "../../../${NAME}.tar.gz" veto | |
| env: | |
| TARGET: ${{ matrix.target }} | |
| NAME: ${{ matrix.name }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.name }} | |
| path: ${{ matrix.name }}.tar.gz | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: artifacts/**/*.tar.gz | |
| generate_release_notes: true |