Skip to content

using toml and lua to config content #15

using toml and lua to config content

using toml and lua to config content #15

name: Build For Linux
on:
push:
branches: [feat*]
pull_request:
branches: [main, next, pu*] # those branches cannnot be pushed directly
env:
SRC_DIR: src # Souce Dir
jobs:
StandaloneLinux64_TestRunner_Test:
name: StandaloneLinux64_TestRunner_Test
environment: Unity
runs-on: ubuntu-latest
steps:
# Check
- name: Checkout project
uses: actions/checkout@v4
with:
lfs: true
- name: Cache
uses: actions/cache@v3
with:
path: ${{env.SRC_DIR}}/Library
key: Library-Test-QS-StandaloneLinux64 # Library-<purpose>-<prihect name>-<target platform>
restore-keys: |
Library-QS-
Library-
# Test
- name: Run tests
id: StandaloneLinux64_Test
uses: game-ci/unity-test-runner@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectPath: ${{ env.SRC_DIR}}
# unityVersion: "2022.3.45f1" CI will lookup auto
# Output
- name : Upload Test Results
uses: actions/upload-artifact@v3
with:
name: Linux Test Result
path: ${{ steps.StandaloneLinux64_Test.outputs.artifactsPath }}
- name: Upload Test Coverage Results
uses: actions/upload-artifact@v3
if: always()
with:
name: Coverage results
path: ${{ steps.StandaloneLinux64_Test.outputs.coveragePath }}
StandaloneLinux64_Build:
name: StandaloneLinux64_Build
environment: Unity
runs-on: ubuntu-latest
permissions: # for create release
contents: write
discussions: write
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
# Cache
- uses: actions/cache@v3
with:
path: ${{env.SRC_DIR}}/Library
key: Library-Build-QS-StandaloneLinux64
restore-keys: |
Library-Build-QS-
Library-
# Build
- name: Build project
uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: StandaloneLinux64
allowDirtyBuild: true
projectPath: ${{ env.SRC_DIR}}
# Output
- uses: actions/upload-artifact@v3
with:
name: Build_StandaloneLinux64
path: build
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ env.SRC_DIR }}/build