Fixed a bug sometimes causing enemies (woody) to have their scale setโฆ #225
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GameCI Template ๐ฎ | |
on: | |
push: | |
branches: | |
- develop # Deploy to github pages only. | |
- main # Deploy to itch and steam. | |
workflow_dispatch: | |
env: | |
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} | |
ITCH_USERNAME: yanniboi | |
ITCH_GAME_ID: editarrr-2 | |
STEAM_APP_ID: 2609410 | |
jobs: | |
buildWebGL: | |
name: Build for WebGL ๐ฅ๏ธ | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
outputs: | |
replaceFiles: ${{ steps.replace.outputs.modifiedFiles }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- name: Set Production Flag | |
uses: jacobtomlinson/gha-find-replace@v3 | |
if: github.ref == 'refs/heads/main' # develop branch should still be dev env. | |
id: replace | |
with: | |
find: "CI_DEPLOY_TARGET" | |
replace: "DEPLOY_TARGET_PRODUCTION" | |
include: "ProjectSettings/ProjectSettings.asset" | |
- name: Restore Library cache | |
uses: actions/cache@v2 | |
with: | |
path: Library | |
key: Library-build-WebGL | |
restore-keys: | | |
Library-build- | |
Library- | |
- uses: game-ci/unity-builder@v2 | |
with: | |
targetPlatform: WebGL | |
allowDirtyBuild: true # This is necessary as we alter the deployment flag. | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: build-WebGL | |
path: build/WebGL | |
retention-days: 1 | |
buildForAllSupportedPlatforms: | |
name: Build for ${{ matrix.targetPlatform }} | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' # Only build on main branch | |
strategy: | |
fail-fast: false | |
matrix: | |
targetPlatform: | |
- StandaloneLinux64 | |
- StandaloneWindows64 | |
- StandaloneOSX | |
outputs: | |
buildVersion: ${{ steps.build.outputs.buildVersion }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- name: Set Production Flag | |
uses: jacobtomlinson/gha-find-replace@v3 | |
id: replace | |
with: | |
find: "CI_DEPLOY_TARGET" | |
replace: "DEPLOY_TARGET_PRODUCTION" | |
include: "ProjectSettings/ProjectSettings.asset" | |
- uses: actions/cache@v3 | |
with: | |
path: Library | |
key: | |
Library-build-${{ matrix.targetPlatform }} | |
restore-keys: | | |
Library-build-${{ matrix.targetPlatform }}- | |
Library-build- | |
Library- | |
- name: Build game for ${{ matrix.targetPlatform }} | |
uses: game-ci/unity-builder@v3 | |
id: build | |
with: | |
targetPlatform: ${{ matrix.targetPlatform }} | |
versioning: Semantic | |
allowDirtyBuild: true # This is necessary as we alter the deployment flag. | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: build-${{ matrix.targetPlatform }} | |
path: build/${{ matrix.targetPlatform }} | |
retention-days: 1 | |
deployPages: | |
needs: buildWebGL | |
name: Deploy to Github Pages ๐ | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: build-WebGL | |
path: build | |
- name: Deploy ๐ | |
uses: JamesIves/github-pages-deploy-action@4.1.4 | |
with: | |
branch: gh-pages | |
folder: build/WebGL | |
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@v3 | |
with: | |
name: build-${{ matrix.channel }} | |
path: build/${{ matrix.channel }} | |
- uses: KikimoraGames/itch-publish@v0.0.3 | |
with: | |
butlerApiKey: ${{secrets.BUTLER_API_KEY}} | |
gameData: ./build/${{ matrix.channel }} | |
itchUsername: ${{env.ITCH_USERNAME}} | |
itchGameId: ${{ env.ITCH_GAME_ID }} | |
buildChannel: ${{ matrix.channel }} | |
buildNumber: ${{ needs.version.outputs.version_hash }} | |
deployToSteam: | |
needs: [buildForAllSupportedPlatforms] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Download StandaloneWindows64 Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: build-StandaloneWindows64 | |
path: build/StandaloneWindows64 | |
- name: Download StandaloneLinux64 Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: build-StandaloneLinux64 | |
path: build/StandaloneLinux64 | |
- name: Download StandaloneOSX Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: build-StandaloneOSX | |
path: build/StandaloneOSX | |
- uses: game-ci/steam-deploy@v3 | |
with: | |
username: ${{ secrets.STEAM_BUILD_USERNAME }} | |
configVdf: ${{ secrets.STEAM_CONFIG_VDF}} | |
appId: ${{ env.STEAM_APP_ID }} | |
buildDescription: v${{ needs.buildForAllSupportedPlatforms.outputs.buildVersion }} | |
rootPath: build | |
firstDepotIdOverride: 2609412 # We are skipping depot 1 as it is shared between all platforms | |
depot1Path: StandaloneWindows64 | |
depot2Path: StandaloneLinux64 | |
depot3Path: StandaloneOSX | |
releaseBranch: alpha |