release: v0.2.10 — worker status shows version + auto-update summary #14
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 | |
| # Tag a release with `git tag v0.1.1 && git push --tags`. This workflow | |
| # builds the c0mpute binary for Linux / macOS / Windows on x86_64 and | |
| # aarch64, packages each as a tarball (zip on Windows), generates a | |
| # SHA-256 checksum, and uploads the lot to a GitHub Release. | |
| # | |
| # Stable install URL: https://c0mpute.com/releases/latest/<artifact> | |
| # redirects to https://github.com/profullstack/c0mpute/releases/latest/download/<artifact> | |
| # (configured in apps/web/next.config.mjs). | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| name: ${{ matrix.platform }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Linux: musl targets produce fully static binaries that run | |
| # on any Linux distro (no glibc version dependency). Building | |
| # against glibc on ubuntu-latest (24.04, glibc 2.39) made the | |
| # v0.1.0 binary unusable on older Linux. | |
| - platform: linux-x86_64 | |
| os: ubuntu-latest | |
| target: x86_64-unknown-linux-musl | |
| - platform: linux-aarch64 | |
| os: ubuntu-24.04-arm | |
| target: aarch64-unknown-linux-musl | |
| # Both Mac targets cross-built from the arm64 runner — Intel | |
| # mac runners (macos-13) have minimal capacity and queue | |
| # indefinitely. Apple's Xcode toolchain cross-compiles | |
| # x86_64-apple-darwin natively from arm64. | |
| - platform: darwin-x86_64 | |
| os: macos-latest | |
| target: x86_64-apple-darwin | |
| - platform: darwin-aarch64 | |
| os: macos-latest | |
| target: aarch64-apple-darwin | |
| - platform: windows-x86_64 | |
| os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: ${{ matrix.target }} | |
| - name: Install musl tools (Linux musl targets) | |
| if: contains(matrix.target, 'linux-musl') | |
| run: sudo apt-get update && sudo apt-get install -y musl-tools | |
| - name: Build c0mpute binary | |
| run: cargo build --release --bin c0mpute --target ${{ matrix.target }} | |
| - name: Package artifact (Unix) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| set -eu | |
| BIN=target/${{ matrix.target }}/release/c0mpute | |
| ARTIFACT=c0mpute-${{ matrix.platform }}.tar.gz | |
| tar -czf "$ARTIFACT" -C "$(dirname "$BIN")" c0mpute | |
| shasum -a 256 "$ARTIFACT" > "$ARTIFACT.sha256" | |
| echo "ARTIFACT=$ARTIFACT" >> "$GITHUB_ENV" | |
| echo "ARTIFACT_SHA=$ARTIFACT.sha256" >> "$GITHUB_ENV" | |
| - name: Package artifact (Windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| $bin = "target/${{ matrix.target }}/release/c0mpute.exe" | |
| $artifact = "c0mpute-${{ matrix.platform }}.zip" | |
| Compress-Archive -Path $bin -DestinationPath $artifact | |
| $hash = (Get-FileHash -Algorithm SHA256 $artifact).Hash.ToLower() | |
| "$hash $artifact" | Out-File -Encoding ascii "$artifact.sha256" | |
| "ARTIFACT=$artifact" | Out-File -Append -Encoding ascii $env:GITHUB_ENV | |
| "ARTIFACT_SHA=$artifact.sha256" | Out-File -Append -Encoding ascii $env:GITHUB_ENV | |
| - name: Upload to GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| ${{ env.ARTIFACT }} | |
| ${{ env.ARTIFACT_SHA }} | |
| fail_on_unmatched_files: true | |
| generate_release_notes: true |