82 lines
2.0 KiBLFS
YAML
82 lines
2.0 KiBLFS
YAML
name: GameCI Template 🎮
|
|
|
|
on: push
|
|
|
|
env:
|
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
|
|
jobs:
|
|
buildWebGL:
|
|
name: Build for WebGL 🖥️
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Create LFS file list
|
|
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
|
|
|
|
- name: Restore LFS cache
|
|
uses: actions/cache@v3
|
|
id: lfs-cache
|
|
with:
|
|
path: .git/lfs
|
|
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}
|
|
|
|
- name: Git LFS Pull
|
|
run: |
|
|
git lfs pull
|
|
git add .
|
|
git reset --hard
|
|
|
|
- name: Restore Library cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: Library
|
|
key: Library-build-WebGL
|
|
restore-keys: |
|
|
Library-build-
|
|
Library-
|
|
|
|
- uses: webbertakken/unity-builder@v2
|
|
with:
|
|
targetPlatform: WebGL
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: build-WebGL
|
|
path: build/WebGL
|
|
|
|
deployPages:
|
|
needs: buildWebGL
|
|
name: Deploy to Itch.io 🚀
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: build-WebGL
|
|
path: build
|
|
|
|
- name: Display structure of root files
|
|
run: ls -R
|
|
working-directory: build/WebGL
|
|
|
|
- name: Deploy 🚀
|
|
uses: JamesIves/github-pages-deploy-action@4.1.4
|
|
with:
|
|
branch: itch-io
|
|
folder: build/WebGL
|
|
|
|
- uses: manleydev/butler-publish-itchio-action@master
|
|
env:
|
|
BUTLER_CREDENTIALS: ${{ secrets.ITCH_IO_API_KEY }}
|
|
CHANNEL: HTML
|
|
ITCH_GAME: YOUR-ITCH-GAME-NAME
|
|
ITCH_USER: YOUR-ITCH-USER-NAME
|
|
BRANCH: itch-io
|
|
PACKAGE: build/WebGL |