chore: bump version to 0.7.6 #78
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 | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.target }} | |
| strategy: | |
| matrix: | |
| include: | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| binary: omni | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| binary: omni | |
| - target: x86_64-unknown-linux-musl | |
| os: ubuntu-latest | |
| binary: omni | |
| - target: aarch64-unknown-linux-musl | |
| os: ubuntu-latest | |
| binary: omni | |
| - target: x86_64-pc-windows-msvc | |
| os: windows-latest | |
| binary: omni.exe | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install musl tools (Linux x86_64) | |
| if: matrix.target == 'x86_64-unknown-linux-musl' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y musl-tools | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.target }} | |
| - name: Build release (macOS) | |
| if: runner.os == 'macOS' | |
| run: cargo build --release --target ${{ matrix.target }} | |
| - name: Build release (Linux) | |
| if: runner.os == 'Linux' | |
| uses: houseabsolute/actions-rust-cross@v1 | |
| with: | |
| command: build | |
| target: ${{ matrix.target }} | |
| args: "--release" | |
| - name: Build release (Windows) | |
| if: runner.os == 'Windows' | |
| run: cargo build --release --target ${{ matrix.target }} | |
| - name: Package binary | |
| shell: bash | |
| run: | | |
| mkdir -p dist | |
| cp target/${{ matrix.target }}/release/${{ matrix.binary }} dist/ | |
| cd dist | |
| if [ "${{ runner.os }}" = "Windows" ]; then | |
| 7z a omni-${{ github.ref_name }}-${{ matrix.target }}.zip ${{ matrix.binary }} | |
| sha256sum omni-${{ github.ref_name }}-${{ matrix.target }}.zip > omni-${{ github.ref_name }}-${{ matrix.target }}.zip.sha256 | |
| else | |
| tar czf omni-${{ github.ref_name }}-${{ matrix.target }}.tar.gz ${{ matrix.binary }} | |
| sha256sum omni-${{ github.ref_name }}-${{ matrix.target }}.tar.gz > omni-${{ github.ref_name }}-${{ matrix.target }}.tar.gz.sha256 | |
| fi | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: omni-${{ matrix.target }} | |
| path: dist/omni-${{ github.ref_name }}-${{ matrix.target }}.* | |
| release: | |
| name: Create Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| path: artifacts | |
| - name: Collect release files | |
| run: | | |
| mkdir -p release | |
| find artifacts -type f \( -name '*.tar.gz' -o -name '*.zip' -o -name '*.sha256' \) -exec cp {} release/ \; | |
| echo "=== Release files ===" | |
| ls -la release/ | |
| # Generate combined SHA256SUMS | |
| cd release | |
| cat *.sha256 > SHA256SUMS | |
| echo "=== SHA256SUMS ===" | |
| cat SHA256SUMS | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| generate_release_notes: true | |
| files: | | |
| release/*.tar.gz | |
| release/*.zip | |
| release/SHA256SUMS | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |