mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 03:35:10 +00:00
Merge pull request #3 from huantianad/master
Setup GitHub Actions CI for automatic builds.
This commit is contained in:
commit
78825c9216
2 changed files with 78 additions and 0 deletions
21
.github/workflows/activation.yml
vendored
Normal file
21
.github/workflows/activation.yml
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
name: Acquire activation file
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
activation:
|
||||||
|
name: Request manual activation file 🔑
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
# Request manual activation file
|
||||||
|
- name: Request manual activation file
|
||||||
|
id: getManualLicenseFile
|
||||||
|
uses: game-ci/unity-request-activation-file@v2
|
||||||
|
|
||||||
|
# Upload artifact (Unity_v20XX.X.XXXX.alf)
|
||||||
|
- name: Expose as artifact
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ steps.getManualLicenseFile.outputs.filePath }}
|
||||||
|
path: ${{ steps.getManualLicenseFile.outputs.filePath }}
|
57
.github/workflows/main.yml
vendored
Normal file
57
.github/workflows/main.yml
vendored
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
name: Build my project ✨
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build for ${{ matrix.targetPlatform }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
targetPlatform:
|
||||||
|
- StandaloneWindows64
|
||||||
|
- StandaloneWindows
|
||||||
|
- StandaloneLinux64
|
||||||
|
- StandaloneOSX
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
# with:
|
||||||
|
# lfs: true
|
||||||
|
|
||||||
|
# Cache resued Library files to speed up compilation
|
||||||
|
- 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 }}
|
||||||
|
|
||||||
|
# Build project with Unity
|
||||||
|
- 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 }}
|
||||||
|
|
||||||
|
# Output
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.targetPlatform }}-build
|
||||||
|
path: ./build/${{ matrix.targetPlatform }}/
|
Loading…
Reference in a new issue