com.wallstop-studios.unity-helpers 2.0.0-rc30 → 2.0.0-rc31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
name: Export and Release Unity Package
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows: ["Unity Tests"]
|
|
6
|
+
types:
|
|
7
|
+
- completed
|
|
4
8
|
push:
|
|
5
9
|
branches:
|
|
6
|
-
- main
|
|
10
|
+
- main
|
|
7
11
|
paths:
|
|
8
12
|
- 'package.json'
|
|
9
13
|
|
|
@@ -15,7 +19,7 @@ jobs:
|
|
|
15
19
|
- name: Checkout Repository
|
|
16
20
|
uses: actions/checkout@v4
|
|
17
21
|
with:
|
|
18
|
-
fetch-depth: 0 #
|
|
22
|
+
fetch-depth: 0 # Ensure full commit history for version comparison
|
|
19
23
|
|
|
20
24
|
- name: Set up Node.js
|
|
21
25
|
uses: actions/setup-node@v4
|
|
@@ -35,9 +39,9 @@ jobs:
|
|
|
35
39
|
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
|
|
36
40
|
echo "should_build=true" >> $GITHUB_ENV
|
|
37
41
|
|
|
38
|
-
# Check
|
|
42
|
+
# Check for pre-release versions
|
|
39
43
|
if [[ "$NEW_VERSION" == *"rc"* ]]; then
|
|
40
|
-
echo "This is a release
|
|
44
|
+
echo "This is a pre-release (next tag)."
|
|
41
45
|
echo "IS_PRERELEASE=true" >> $GITHUB_ENV
|
|
42
46
|
else
|
|
43
47
|
echo "This is a stable release."
|
|
@@ -48,12 +52,22 @@ jobs:
|
|
|
48
52
|
echo "should_build=false" >> $GITHUB_ENV
|
|
49
53
|
fi
|
|
50
54
|
|
|
55
|
+
- name: Activate Unity License
|
|
56
|
+
if: env.should_build == 'true'
|
|
57
|
+
env:
|
|
58
|
+
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
59
|
+
run: |
|
|
60
|
+
echo "$UNITY_LICENSE" | base64 --decode > UnityLicense.ulf
|
|
61
|
+
echo "Unity license activated."
|
|
62
|
+
|
|
51
63
|
- name: Set up Unity
|
|
52
64
|
if: env.should_build == 'true'
|
|
53
65
|
uses: game-ci/unity-builder@v3
|
|
54
66
|
with:
|
|
55
67
|
unityVersion: 2022.3.10f1 # Change to your Unity version
|
|
56
68
|
targetPlatform: StandaloneLinux64
|
|
69
|
+
activateLicense: true
|
|
70
|
+
unityLicense: ${{ secrets.UNITY_LICENSE }}
|
|
57
71
|
|
|
58
72
|
- name: Export Unity Package
|
|
59
73
|
if: env.should_build == 'true'
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Unity Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test:
|
|
9
|
+
name: Run Unity Tests
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout repository
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Cache Library folder
|
|
17
|
+
uses: actions/cache@v4
|
|
18
|
+
with:
|
|
19
|
+
path: Library
|
|
20
|
+
key: Library-${{ runner.os }}-${{ hashFiles('Packages/manifest.json') }}
|
|
21
|
+
restore-keys: |
|
|
22
|
+
Library-${{ runner.os }}-
|
|
23
|
+
|
|
24
|
+
- name: Activate Unity License
|
|
25
|
+
uses: game-ci/unity-activate@v3
|
|
26
|
+
env:
|
|
27
|
+
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
28
|
+
|
|
29
|
+
- name: Run Unity Tests
|
|
30
|
+
uses: game-ci/unity-test-runner@v3
|
|
31
|
+
with:
|
|
32
|
+
projectPath: .
|
|
33
|
+
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
|
34
|
+
testMode: all
|
|
35
|
+
|
|
36
|
+
- name: Deactivate Unity License
|
|
37
|
+
if: always()
|
|
38
|
+
uses: game-ci/unity-return-license@v3
|