name: Release on: push: tags: - 'v*' permissions: contents: write jobs: build: name: Build ${{ matrix.target }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: include: - target: x86_64-unknown-linux-gnu artifact: scr33ny-x86_64-linux - target: aarch64-unknown-linux-gnu artifact: scr33ny-aarch64-linux cross: true steps: - uses: actions/checkout@v4 - name: Install Rust (stable) uses: dtolnay/rust-toolchain@stable with: targets: ${{ matrix.target }} - name: Cache cargo uses: actions/cache@v4 with: path: | ~/.cargo/registry ~/.cargo/git target key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.toml') }} restore-keys: ${{ runner.os }}-${{ matrix.target }}-cargo- # Native x86_64 build - name: Install system dependencies (native) if: ${{ !matrix.cross }} run: | sudo apt-get update -q sudo apt-get install -y --no-install-recommends \ libwayland-dev \ libxkbcommon-dev \ pkg-config - name: Build (native) if: ${{ !matrix.cross }} run: cargo build --release --target ${{ matrix.target }} # ARM64 cross-compilation via cross - name: Install cross if: ${{ matrix.cross }} uses: taiki-e/install-action@v2 with: tool: cross - name: Build (cross) if: ${{ matrix.cross }} run: cross build --release --target ${{ matrix.target }} env: CROSS_NO_WARNINGS: 0 - name: Rename binary run: | cp target/${{ matrix.target }}/release/scr33ny ${{ matrix.artifact }} - name: Upload artifact uses: actions/upload-artifact@v4 with: name: ${{ matrix.artifact }} path: ${{ matrix.artifact }} release: name: Create GitHub 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: ls -lh artifacts/ - name: Create release uses: softprops/action-gh-release@v2 with: name: "scr33ny ${{ github.ref_name }}" body: | ## Install Download the binary for your architecture, make it executable, and move it to your PATH: ```bash # x86_64 (most desktops/laptops) curl -Lo scr33ny https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/scr33ny-x86_64-linux chmod +x scr33ny sudo mv scr33ny /usr/local/bin/ # ARM64 (Raspberry Pi 4+, Apple Silicon VM, etc.) curl -Lo scr33ny https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/scr33ny-aarch64-linux chmod +x scr33ny sudo mv scr33ny /usr/local/bin/ ``` **Requirements:** Wayland compositor, `libwayland-client`, `libxkbcommon`. See [README](https://github.com/${{ github.repository }}#readme) for usage and config. files: | artifacts/scr33ny-x86_64-linux/scr33ny-x86_64-linux artifacts/scr33ny-aarch64-linux/scr33ny-aarch64-linux draft: false prerelease: ${{ contains(github.ref_name, '-') }}