Skip to content

Commit 1317165

Browse files
fsd
1 parent a004a48 commit 1317165

File tree

1 file changed

+4
-29
lines changed

1 file changed

+4
-29
lines changed

.github/workflows/unity-build.yml

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,26 @@
1-
name: Unity Build
2-
3-
on:
4-
push:
5-
branches: [ "main" ]
6-
pull_request:
7-
branches: [ "main" ]
8-
91
jobs:
102
build:
113
runs-on: ubuntu-latest
124
steps:
13-
# 1. Checkout the repository
145
- uses: actions/checkout@v3
156

16-
# 2. Get Unity version from ProjectSettings/ProjectVersion.txt
177
- name: Get Unity Version
188
id: get-unity-version
199
run: |
2010
version=$(grep "^m_EditorVersion:" ProjectSettings/ProjectVersion.txt | sed 's/m_EditorVersion: //')
2111
echo "version=$version" >> $GITHUB_OUTPUT
2212
23-
# 3. Request Unity activation (only needed once to generate .alf file)
24-
- name: Unity - Request Activation File
25-
uses: game-ci/unity-request-activation-file@v2
26-
with:
27-
unityVersion: ${{ steps.get-unity-version.outputs.version }}
28-
# This step will output: Unity_v20XX.x.alf (activation file)
29-
30-
# 4. Upload activation file as artifact so you can download it
31-
- name: Upload activation file
32-
uses: actions/upload-artifact@v3
33-
with:
34-
name: Unity_ActivationFile
35-
path: Unity_*.alf
36-
37-
# 5. If UNITY_LICENSE secret is available, activate Unity
3813
- name: Unity - Activate
39-
if: env.UNITY_LICENSE != ''
4014
uses: game-ci/unity-activate@v2
4115
with:
4216
unityVersion: ${{ steps.get-unity-version.outputs.version }}
4317
env:
44-
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
18+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
19+
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
20+
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
4521

46-
# 6. Build Unity project
4722
- name: Unity - Build
4823
uses: game-ci/unity-builder@v4
4924
with:
5025
unityVersion: ${{ steps.get-unity-version.outputs.version }}
51-
targetPlatform: Android # change to StandaloneWindows/IOS/etc.
26+
targetPlatform: Android

0 commit comments

Comments
 (0)