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 - uses: actions/create-github-app-token@v2 id: components-token if: github.event_name == 'workflow_dispatch' && inputs.tag != '' with: app-id: ${{ vars.DROIDDECK_CI_APP_ID }} private-key: ${{ secrets.DROIDDECK_CI_APP_KEY }} owner: Droid-Deck repositories: DroidDeck-Components - name: Publish if: github.event_name == 'workflow_dispatch' && inputs.tag != '' env: GH_TOKEN: ${{ steps.components-token.outputs.token }} GH_REPO: Droid-Deck/DroidDeck-Components TAG: ${{ inputs.tag }} run: | set -euo pipefail if gh release view "$TAG" >/dev/null 2>&1; then echo "::error::$TAG is already published in DroidDeck-Components, and published tags are never replaced: use a new tag" exit 1 fi gh release create "$TAG" --latest=false --prerelease=false --title "$TAG" --notes "gamescope 3.16.29 with tools/gamescope/patches ($GITHUB_REPOSITORY $GITHUB_SHA, run $GITHUB_RUN_ID); staged by the apk over /usr/local/bin/gamescope. sha256 $(cut -d' ' -f1 gamescope.tzst.sha256)" gamescope.tzst gamescope.tzst.sha256 gh release edit "$TAG" --latest=false --prerelease=false