diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index c5b0dbc..cedf597 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -40,6 +40,45 @@ jobs: VER="${GITHUB_REF_NAME#v}" dart tool/release_publish.dart "$GITHUB_REF_NAME" "dist/watch-together-$VER-linux-x64.tar.gz" + arch: + runs-on: ubuntu-latest + container: archlinux:latest + steps: + - name: Install Arch build deps + run: | + pacman -Syu --noconfirm --needed base-devel clang cmake flutter git \ + gtk3 libepoxy mpv ninja pkgconf + + - name: Checkout + run: | + git init -q . + git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git" + git fetch -q --tags origin "$GITHUB_SHA" + git checkout -q --force FETCH_HEAD + + - name: Build Arch package + run: | + useradd --create-home builder + chown -R builder . + runuser -u builder -- sh -c \ + 'cd deploy/arch && makepkg --cleanbuild --noconfirm --nodeps' + + - name: Publish Arch package + if: startsWith(github.ref, 'refs/tags/v') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }} + run: | + TOKEN="${RELEASE_TOKEN:-${GITHUB_TOKEN:-$GITEA_TOKEN}}" + test -n "$TOKEN" + set -- deploy/arch/*.pkg.tar.zst + test -f "$1" + curl --fail --show-error --request PUT \ + --header "Authorization: token $TOKEN" \ + --upload-file "$1" \ + "$GITHUB_API_URL/packages/$GITHUB_REPOSITORY_OWNER/arch/core/x86_64" + windows: # yuuka-windows: host-mode runner (no containers), runs as SYSTEM, has # git + VS 2022 Build Tools but no bash/python — PowerShell and Dart