HeavenStudioPlus/.github/workflows/build.yml

77 lines
2.2 KiB
YAML
Raw Normal View History

2023-06-17 19:07:24 +00:00
name: Build Heaven Studio
on:
push:
branches: [ "master", "release_1", "actions_rework" ]
workflow_dispatch: {}
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
- StandaloneOSX
2023-06-17 19:34:42 +00:00
- StandaloneLinux64
steps:
- name: Checkout repository
2023-06-17 19:34:42 +00:00
uses: actions/checkout@v3
# with:
# lfs: true
2023-06-17 19:07:24 +00:00
# Cache reused Library files to speed up compilation
2023-06-17 19:34:42 +00:00
- uses: actions/cache@v3
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
buildMethod: UnityBuilderAction.BuildScript.Build
targetPlatform: ${{ matrix.targetPlatform }}
2023-06-17 19:07:24 +00:00
2023-06-17 19:49:49 +00:00
# Required on Mac/Linux to keep executable permissions
- name: Tar files
2023-06-17 19:49:49 +00:00
if: matrix.targetPlatform != 'StandaloneWindows64'
run: tar -cvf ${{ matrix.targetPlatform }}.tar ./build/${{ matrix.targetPlatform }}
2023-06-17 19:07:24 +00:00
2023-06-17 19:49:49 +00:00
- name: Upload Artifact (Windows)
if: matrix.targetPlatform == 'StandaloneWindows64'
2023-06-17 19:07:24 +00:00
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.targetPlatform }}-build
path: ./build/${{ matrix.targetPlatform }}/
2023-06-17 19:49:49 +00:00
- name: Upload Artifact (macOS / Linux)
if: matrix.targetPlatform != 'StandaloneWindows64'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.targetPlatform }}-build
path: ${{ matrix.targetPlatform }}.tar
2023-06-17 19:07:24 +00:00
- name: debug thing
run: tree .