Bump version to v0.2.0 #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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.target }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| # Linux x86_64 | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| archive: tar.gz | |
| # Linux ARM64 | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| archive: tar.gz | |
| cross: true | |
| # macOS x86_64 (Intel) | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| archive: tar.gz | |
| # macOS ARM64 (Apple Silicon) | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| archive: tar.gz | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install cross (for cross-compilation) | |
| if: matrix.cross | |
| run: cargo install cross --git https://github.com/cross-rs/cross | |
| - name: Install Linux ARM64 linker | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' && !matrix.cross | |
| run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.target }} | |
| - name: Build (native) | |
| if: "!matrix.cross" | |
| run: cargo build --release --target ${{ matrix.target }} --bin vajra | |
| - name: Build (cross) | |
| if: matrix.cross | |
| run: cross build --release --target ${{ matrix.target }} --bin vajra | |
| - name: Package (tar.gz) | |
| run: | | |
| cd target/${{ matrix.target }}/release | |
| tar czf ../../../vajra-${{ github.ref_name }}-${{ matrix.target }}.tar.gz vajra | |
| cd ../../.. | |
| - name: Generate SHA256 | |
| run: | | |
| cd . | |
| sha256sum vajra-${{ github.ref_name }}-${{ matrix.target }}.tar.gz > vajra-${{ github.ref_name }}-${{ matrix.target }}.tar.gz.sha256 || \ | |
| shasum -a 256 vajra-${{ github.ref_name }}-${{ matrix.target }}.tar.gz > vajra-${{ github.ref_name }}-${{ matrix.target }}.tar.gz.sha256 | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vajra-${{ matrix.target }} | |
| path: | | |
| vajra-${{ github.ref_name }}-${{ matrix.target }}.tar.gz | |
| vajra-${{ github.ref_name }}-${{ matrix.target }}.tar.gz.sha256 | |
| release: | |
| name: Create 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: List artifacts | |
| run: find artifacts -type f | sort | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| body: | | |
| ## Vajra ${{ github.ref_name }} | |
| **Break noise. Preserve truth.** | |
| Deterministic semantic reduction engine for structured data. | |
| ### Installation | |
| Download the binary for your platform, extract, and add to your PATH: | |
| ```bash | |
| # Linux x86_64 | |
| tar xzf vajra-${{ github.ref_name }}-x86_64-unknown-linux-gnu.tar.gz | |
| sudo mv vajra /usr/local/bin/ | |
| # macOS Apple Silicon | |
| tar xzf vajra-${{ github.ref_name }}-aarch64-apple-darwin.tar.gz | |
| sudo mv vajra /usr/local/bin/ | |
| # macOS Intel | |
| tar xzf vajra-${{ github.ref_name }}-x86_64-apple-darwin.tar.gz | |
| sudo mv vajra /usr/local/bin/ | |
| ``` | |
| Or build from source: `cargo install vajra-cli` | |
| ### Verify | |
| ```bash | |
| echo '{"hello": "world"}' | vajra inspect - | |
| ``` | |
| files: | | |
| artifacts/**/*.tar.gz | |
| artifacts/**/*.sha256 |