2023-06-17 19:07:24 +00:00
|
|
|
name: Build Heaven Studio
|
2022-02-24 00:36:36 +00:00
|
|
|
|
2023-06-08 21:17:40 +00:00
|
|
|
on:
|
|
|
|
push:
|
2023-06-17 19:11:18 +00:00
|
|
|
branches: [ "master", "release_1", "actions_rework" ]
|
2022-02-24 00:36:36 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build for ${{ matrix.targetPlatform }}
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
targetPlatform:
|
2023-06-17 19:07:24 +00:00
|
|
|
- StandaloneWindows64
|
2022-02-24 00:36:36 +00:00
|
|
|
- StandaloneOSX
|
2023-06-17 19:07:24 +00:00
|
|
|
- StandaloneLinux
|
2022-02-24 00:36:36 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
# with:
|
|
|
|
# lfs: true
|
|
|
|
|
2023-06-17 19:07:24 +00:00
|
|
|
# Cache reused Library files to speed up compilation
|
2022-02-24 00:36:36 +00:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: Library
|
|
|
|
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
|
|
|
|
restore-keys: |
|
|
|
|
Library-
|
|
|
|
|
|
|
|
# Test (No tests yet, leaving this here for future.)
|
|
|
|
# - name: Run tests
|
|
|
|
# uses: game-ci/unity-test-runner@v2
|
|
|
|
# env:
|
|
|
|
# UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
|
|
# with:
|
|
|
|
# githubToken: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Build project
|
|
|
|
uses: game-ci/unity-builder@v2
|
|
|
|
env:
|
|
|
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
|
|
with:
|
|
|
|
unityVersion: auto
|
|
|
|
buildName: Heaven Studio
|
|
|
|
buildsPath: build
|
|
|
|
targetPlatform: ${{ matrix.targetPlatform }}
|
2023-06-17 19:07:24 +00:00
|
|
|
|
|
|
|
# Required on Mac for permission reasons
|
2023-01-23 14:58:58 +00:00
|
|
|
- name: Tar files
|
2023-06-17 19:12:18 +00:00
|
|
|
if: runner.targetPlatform == 'StandaloneOSX'
|
2023-01-23 14:58:58 +00:00
|
|
|
run: tar -cvf ${{ matrix.targetPlatform }}.tar ./build/${{ matrix.targetPlatform }}
|
2023-06-17 19:07:24 +00:00
|
|
|
|
|
|
|
- name: Upload Artifact (Windows / Linux)
|
|
|
|
if: runner.targetPlatform != 'StandaloneOSX'
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.targetPlatform }}-build
|
|
|
|
path: ./build/${{ matrix.targetPlatform }}/
|
|
|
|
|
|
|
|
- name: Upload Artifact (macOS)
|
|
|
|
if: runner.targetPlatform == 'StandaloneOSX'
|
2023-01-23 14:58:58 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-02-24 00:36:36 +00:00
|
|
|
with:
|
|
|
|
name: ${{ matrix.targetPlatform }}-build
|
2023-01-23 14:58:58 +00:00
|
|
|
path: ${{ matrix.targetPlatform }}.tar
|
|
|
|
|
2023-06-17 19:07:24 +00:00
|
|
|
- name: debug thing
|
|
|
|
run: tree .
|
|
|
|
|