-
Notifications
You must be signed in to change notification settings - Fork 16
54 lines (50 loc) · 2.09 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Citadel Build - Main
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Citadel Build ${{ matrix.plans.targetPlatform }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
plans: [ {targetPlatform: StandaloneOSX, dockerImage: mac-mono, downloadName: Mac64}, {targetPlatform: StandaloneWindows64, dockerImage: windows-mono, downloadName: Win64}, {targetPlatform: StandaloneLinux64, dockerImage: linux-il2cpp, downloadName: Linux64} ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Mark Library folder to be preserved
uses: actions/cache@v3
with:
path: Library
key: Library-${{ matrix.plans.targetPlatform }}
restore-keys: |
Library-
#- name: Run custom image build
# run: |
# echo "${{ secrets.DOCKER_TOKEN }}" | docker login --username "${{ secrets.DOCKER_USERNAME }}" --password-stdin
# chmod +x ./build.sh
# ./build.sh
- name: Download custom Docker image
run: |
echo "${{ secrets.DOCKER_TOKEN }}" | docker login --username "${{ secrets.DOCKER_USERNAME }}" --password-stdin
docker pull josiahjack/citadel-ci:ubuntu-2019.4.35f1-${{ matrix.plans.dockerImage }}-1
- name: Build game
id: build
uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: ${{ matrix.plans.targetPlatform }}
versioning: Semantic
customImage: josiahjack/citadel-ci:ubuntu-2019.4.35f1-${{ matrix.plans.dockerImage }}-1
allowDirtyBuild: true
- name: Upload built files
uses: actions/upload-artifact@v3
with:
name: Citadel_DevBuild_${{ matrix.plans.downloadName }}_${{ steps.build.outputs.buildVersion }}
path: build/${{ matrix.plans.targetPlatform }}
if-no-files-found: error