Skip to content

Instantly share code, notes, and snippets.

@yanniboi
Last active November 25, 2022 13:57
Show Gist options
  • Save yanniboi/541d8048dbc6883d04c7f89dd7a77169 to your computer and use it in GitHub Desktop.
Save yanniboi/541d8048dbc6883d04c7f89dd7a77169 to your computer and use it in GitHub Desktop.
Deploy Itch.io Github Action
name: GameCI Template 🎮
on:
workflow_dispatch:
push:
tags:
- v*
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
ITCH_USERNAME: yanniboi
ITCH_GAME_ID: xanderbop
jobs:
buildWebGL:
name: Build for WebGL 🖥️
runs-on: ubuntu-latest
# Do stuff
buildForAllSupportedPlatforms:
name: Build for ${{ matrix.targetPlatform }}
runs-on: ubuntu-latest
strategy:
matrix:
targetPlatform:
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
- StandaloneWindows64 # Build a Windows 64-bit standalone.
- StandaloneLinux64 # Build a Linux 64-bit standalone.
# Do stuff
deployItch:
needs: [buildWebGL, buildForAllSupportedPlatforms]
name: Deploy to Itch.io 🚀
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
channel:
- StandaloneOSX
- StandaloneWindows64
- StandaloneLinux64
- WebGL
steps:
- uses: actions/download-artifact@v2
with:
name: build-${{ matrix.channel }}
path: build
- uses: KikimoraGames/[email protected]
with:
butlerApiKey: ${{secrets.BUTLER_API_KEY}}
gameData: ./build/${{ matrix.template }}
itchUsername: ${{env.ITCH_USERNAME}}
itchGameId: ${{ env.ITCH_GAME_ID }}
buildChannel: ${{ matrix.channel }}
buildNumber: ${{ needs.version.outputs.version_hash }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment