name: Build gamescope (patched) on: push: branches: [main] paths: - 'tools/gamescope/build-in-arch.sh' - 'tools/gamescope/patches/**' - 'tools/gamescope/runtime-sonames.txt' - '.github/workflows/build-gamescope.yml' workflow_dispatch: inputs: tag: description: 'Release tag to publish as (e.g. gamescope-3.16.29-p1); empty = artifact only' required: false default: '' permissions: contents: write concurrency: group: ${{ inputs.tag && format('gamescope-tag-{0}', inputs.tag) || format('gamescope-{0}-{1}', github.event_name, github.ref) }} cancel-in-progress: ${{ github.event_name == 'push' }} jobs: build: runs-on: ubuntu-24.04-arm timeout-minutes: 120 steps: - uses: actions/checkout@v4 - name: Build in Arch Linux ARM run: | set -euo pipefail docker run --rm -v "$PWD:/work" -w /work menci/archlinuxarm:base-devel bash tools/gamescope/build-in-arch.sh sudo chown -R "$(id -u):$(id -g)" . - uses: actions/upload-artifact@v4 with: name: gamescope-patched path: | gamescope.tzst gamescope.tzst.sha256 - name: Publish if: github.event_name == 'workflow_dispatch' && inputs.tag != '' env: GH_TOKEN: ${{ github.token }} run: | set -euo pipefail gh release create "${{ inputs.tag }}" --latest=false --prerelease=false --title "${{ inputs.tag }}" --notes "gamescope 3.16.29 with tools/gamescope/patches; staged by the apk over /usr/local/bin/gamescope. sha256 $(cut -d' ' -f1 gamescope.tzst.sha256)" gamescope.tzst gamescope.tzst.sha256 || gh release upload "${{ inputs.tag }}" gamescope.tzst gamescope.tzst.sha256 --clobber gh release edit "${{ inputs.tag }}" --latest=false --prerelease=false