From f2ee3c2ed8555032e1eab5cf1f9f4cc82e881cb9 Mon Sep 17 00:00:00 2001 From: Axel Date: Thu, 23 Jul 2026 16:19:01 +0200 Subject: [PATCH] Deploy to itch.io --- .github/workflows/build.yaml | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5fe95a69..6a42b523 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -162,3 +162,48 @@ jobs: asset_name: ${{ env.OUTPUT_FILE }}.sha256 tag: ${{ github.ref }} overwrite: true + + itch_publish_job: + needs: [build] + if: ${{ startsWith(github.event.ref, 'refs/tags/')}} + + runs-on: ubuntu-latest + + env: + BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }} + + steps: + - name: Install butler + run: | + curl -L -o butler.zip https://broth.itch.zone/butler/linux-amd64/LATEST/archive/default + unzip butler.zip + + chmod +x butler + + ./butler -V + + - name: Download Artifacts + uses: robinraju/release-downloader@v1 + with: + tag: ${{ github.ref }} + fileName: '*.tgz' + out-file-path: downloads-tgz + + - name: Download Artifacts + uses: robinraju/release-downloader@v1 + with: + tag: ${{ github.ref }} + fileName: '*.zip' + out-file-path: downloads-zip + + - name: Upload build + run: | + for file in downloads-tgz/*; do + filename=$(basename -- "$file") + ./butler push "$file" lynix/this-space-of-mine:"${filename%.*}" + done + for file in downloads-zip/*; do + filename=$(basename -- "$file") + ./butler push "$file" lynix/this-space-of-mine:"${filename%.*}" + done +