phrog 0.53.0

Mobile-friendly greeter for greetd
name: release-builds

on:
  workflow_call: {}
  workflow_dispatch: {}

permissions:
  contents: read
  packages: read

jobs:
  image-hash:
    runs-on: ubuntu-24.04
    outputs:
      hash: ${{ steps.hash.outputs.value }}
    steps:
      - uses: actions/checkout@v4
      - name: get CI image hash
        id: hash
        run: |
          set -euo pipefail
          echo "value=${{ hashFiles('.github/Dockerfile') }}" >> "$GITHUB_OUTPUT"

  release-gnu:
    name: release-gnu (${{ matrix.target }})
    needs: image-hash
    runs-on: ubuntu-24.04
    container: ghcr.io/samcday/phrog-ci:${{ needs.image-hash.outputs.hash }}
    defaults:
      run:
        shell: bash
    strategy:
      matrix:
        include:
          - target: x86_64-unknown-linux-gnu
    steps:
      - uses: actions/checkout@v4
      - name: Install Rust
        uses: actions-rust-lang/setup-rust-toolchain@v1
      - name: Build
        run: |
          set -euo pipefail
          cargo build --release --locked
      - name: Create archive
        run: |
          set -euo pipefail
          mkdir -p dist
          tar -C target/release -czf "dist/phrog-${{ matrix.target }}.tar.gz" phrog
      - uses: actions/upload-artifact@v4
        with:
          name: release-${{ matrix.target }}
          path: dist/phrog-${{ matrix.target }}.tar.gz