Skip to content

Update README.md

Update README.md #10

name: Build & Deploy WebGL
on:
push:
branches:
- master
jobs:
build:
name: Build Project
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v2
- 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@v2
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@v2
with:
path: Library
key: Library-build-WebGL
restore-keys: |
Library-build-
Library-
- name: Unity Build
uses: game-ci/unity-builder@v2
id: unityBuild
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
versioning: Semantic
targetPlatform: WebGL
unityVersion: 2022.1.16f1
# TODO Change the buildName to the game name
buildName: FallingBlocks
buildsPath: build
- name: Print Version Number
run: echo Project Version ${{ steps.unityBuild.outputs.buildVersion }}
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: build-WebGL
path: build/WebGL
- run: ls -la
deploy:
name: Deploy to itch.io
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/download-artifact@master
with:
name: build-WebGL
path: build/WebGL
- run: ls -la
- name: Butler Deploy
uses: manleydev/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: html5
# TODO Change game name here
ITCH_GAME: falling-blocks
ITCH_USER: Exenter
PACKAGE: build/WebGL
VERSION: ${{ steps.unityBuild.outputs.buildVersion }}