Skip to content

More art

More art #50

Workflow file for this run

name: Bestagon-Defence build
on:
push:
pull_request:
types:
- opened
workflow_dispatch:
jobs:
buildForAllSupportedPlatforms:
name: Build for ${{ matrix.targetPlatform }}
runs-on: ${{ matrix.jobOS }}
strategy:
fail-fast: false
max-parallel: 1
matrix:
include:
- targetPlatform: StandaloneOSX # Build a macOS standalone (Intel 64-bit).
jobOS: macos-latest
- targetPlatform: StandaloneWindows # Build a Windows standalone.
jobOS: ubuntu-latest
- targetPlatform: StandaloneWindows64 # Build a Windows 64-bit standalone.
jobOS: ubuntu-latest
- targetPlatform: StandaloneLinux64 # Build a Linux 64-bit standalone.
jobOS: ubuntu-latest
# - targetPlatform: iOS # Build an iOS player.
# jobOS: ubuntu-latest
# - targetPlatform: Android # Build an Android .apk standalone app.
# jobOS: ubuntu-latest
# - targetPlatform: WebGL # WebGL.
# jobOS: ubuntu-latest
outputs:
StandaloneOSX: ${{ steps.outputResult.outputs.StandaloneOSX }}
StandaloneWindows: ${{ steps.outputResult.outputs.StandaloneWindows }}
StandaloneWindows64: ${{ steps.outputResult.outputs.StandaloneWindows64 }}
StandaloneLinux64: ${{ steps.outputResult.outputs.StandaloneLinux64 }}
#iOS: ${{ steps.outputResult.outputs.iOS }}
Android: ${{ steps.outputResult.outputs.Android }}
#WebGL: ${{ steps.outputResult.outputs.WebGL }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- uses: actions/cache@v3
with:
path: Library
key: Library-${{ matrix.targetPlatform }}
- uses: game-ci/unity-builder@v2
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
# Use for paid version:
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
# Use for free version:
#UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
projectPath: 'Tower Defence'
targetPlatform: ${{ matrix.targetPlatform }}
if: ${{ matrix.targetPlatform != 'Android' }}
- uses: game-ci/unity-builder@v2
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
# Use for paid version:
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
# Use for free version:
#UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
projectPath: 'Tower Defence'
targetPlatform: ${{ matrix.targetPlatform }}
androidKeystoreName: user # This file won't exist, but this property needs to exist.
androidKeystoreBase64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
androidKeystorePass: ${{ secrets.ANDROID_KEYSTORE_PASS }}
androidKeyaliasName: ${{ secrets.ANDROID_KEYALIAS_NAME }}
androidKeyaliasPass: ${{ secrets.ANDROID_KEYALIAS_PASS }}
androidTargetSdkVersion: AndroidApiLevel31
if: ${{ matrix.targetPlatform == 'Android' }}
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.targetPlatform }}
path: |
build/
!*DoNotShip/
# Return License
# - uses: game-ci/unity-return-license@v2.0.0
# if: always()
- id: outputResult
run: echo "${{ matrix.targetPlatform }}Result=${{ job.status }}" >> $GITHUB_ENV
sendSuccessNotification:
runs-on: ubuntu-latest
needs:
- buildForAllSupportedPlatforms
if: ${{ success() }}
steps:
- uses: tsickert/discord-webhook@v5.3.0
with:
webhook-url: ${{ secrets.NIGHTLY_WEBHOOK_URL }}
content: "Build Success"
embed-title: "New Nightly Build Available!"
embed-description: "[You can get the new builds here](https://github.com/Greenfoot5/Bestagon-Defence/actions/runs/${{ github.run_id }})
\n${{ env.StandaloneWindowsResult }}\n*You may need to scroll down to the bottom*"
embed-color: 1546855
sendFailureNotification:
runs-on: ubuntu-latest
needs:
- buildForAllSupportedPlatforms
if: ${{ failure() }}
steps:
- uses: tsickert/discord-webhook@v5.3.0
with:
webhook-url: ${{ secrets.NIGHTLY_WEBHOOK_URL }}
content: "Build Failure"
embed-title: "New Nightly Build Failed!"
embed-description: "[You can find the results here](https://github.com/Greenfoot5/Bestagon-Defence/actions/runs/${{ github.run_id }})\n${{ env.StandaloneWindowsResult }}"
embed-color: 10949957