-
Notifications
You must be signed in to change notification settings - Fork 10
71 lines (63 loc) · 2.11 KB
/
Copy pathpackage.yml
File metadata and controls
71 lines (63 loc) · 2.11 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Package
on:
pull_request: {}
push: { branches: [main, master, develop] }
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# License
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
# Project
UNITY_VERSION: 6000.4.0f1
PROJECT_PATH: .
# Packaging
PKG_VERSION: 0.1.3
BUILD_METHOD: PackageExporter.BatchMode.Export
jobs:
checklicense:
name: check if UNITY_LICENSE is set in github secrets
runs-on: ubuntu-latest
outputs:
is_unity_license_set: ${{ steps.checklicense_job.outputs.is_unity_license_set }}
steps:
- name: Check whether unity activation requests should be done
id: checklicense_job
run: |
echo "Skip activation job: ${{ env.UNITY_LICENSE != '' }}"
echo "::set-output name=is_unity_license_set::${{ env.UNITY_LICENSE != '' }}"
package:
needs: [checklicense]
if: needs.checklicense.outputs.is_unity_license_set == 'true'
name: 📦 ${{ matrix.package-name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package-name:
- UnityWzLib
targetPlatform:
- StandaloneWindows64
steps:
- uses: actions/checkout@v7
with:
lfs: true
- uses: actions/cache@v6.1.0
with:
path: Library
key: Library-test-project-${{ matrix.targetPlatform }}
restore-keys: |
Library-test-project-
Library-
- uses: game-ci/unity-builder@v5.0.0
with:
projectPath: ${{ env.PROJECT_PATH }}
unityVersion: ${{ env.UNITY_VERSION }}
targetPlatform: ${{ matrix.targetPlatform }}
buildMethod: ${{ env.BUILD_METHOD }}
customParameters: -nographics _name "${{ matrix.package-name }}" _version "${{ env.PKG_VERSION }}" _savePath "."
- name: Upload package as artifact
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.package-name }}_v${{ env.PKG_VERSION }}.unitypackage
path: ${{ env.PROJECT_PATH }}/${{ matrix.package-name }}_v${{ env.PKG_VERSION }}.unitypackage