chore: bump to v2.2.1 — CI/test/workflow cleanup release #145
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*] | |
| jobs: | |
| build: | |
| name: Build (${{ matrix.target }}) | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| binary: shimmy | |
| artifact: shimmy-linux-x86_64 | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| binary: shimmy.exe | |
| artifact: shimmy-windows-x86_64.exe | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| binary: shimmy | |
| artifact: shimmy-macos-arm64 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Build | |
| run: cargo build --release --target ${{ matrix.target }} --features airframe,huggingface | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: target/${{ matrix.target }}/release/${{ matrix.binary }} | |
| release: | |
| name: Create Release | |
| needs: [build] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: release-files | |
| - name: Create release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| mkdir -p dist | |
| find release-files -type f -exec cp {} dist/ \; | |
| if gh release view ${{ github.ref_name }} > /dev/null 2>&1; then | |
| gh release upload ${{ github.ref_name }} dist/* --clobber | |
| else | |
| gh release create ${{ github.ref_name }} dist/* \ | |
| --title "Shimmy ${{ github.ref_name }}" \ | |
| --generate-notes | |
| fi | |
| - name: Publish to crates.io | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| run: cargo publish || true |