File tree Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Original file line number Diff line number Diff line change 1- # A workflow to automatically build your Unity project
21name : Unity Build
32
4- # Controls when the action will run
53on :
6- # Triggers the workflow on push events for the "main" branch
74 push :
85 branches : [ "main" ]
9-
10- # Triggers the workflow on pull requests targeting the "main" branch
116 pull_request :
127 branches : [ "main" ]
13-
14- # Allows you to run this workflow manually from the Actions tab
158 workflow_dispatch :
169
1710jobs :
1811 build :
19- # The type of runner that the job will run on
2012 runs-on : ubuntu-latest
2113
2214 steps :
23- # 1. Checkout the repository to the runner
2415 - name : Checkout project
2516 uses : actions/checkout@v4
2617
27- # 2. Automatically get the Unity version from the project settings
2818 - name : Get Unity Version
2919 id : get-unity-version
3020 run : |
3121 version=$(grep "^m_EditorVersion:" ProjectSettings/ProjectVersion.txt | sed 's/m_EditorVersion: //')
3222 echo "version=$version" >> $GITHUB_OUTPUT
3323
34- # 3. Perform the build using GameCI's builder action
3524 - name : Unity - Build
3625 uses : game-ci/unity-builder@v4
3726 env :
38- # Your Unity credentials for a fresh activation on the runner
3927 UNITY_EMAIL : ${{ secrets.UNITY_EMAIL }}
4028 UNITY_PASSWORD : ${{ secrets.UNITY_PASSWORD }}
4129 with :
42- # The Unity version to use for the build
4330 unityVersion : ${{ steps.get-unity-version.outputs.version }}
44-
45- # The platform to build for (WebGL for web builds)
4631 targetPlatform : WebGL
4732
48- # 4. (Optional) Upload the build artifact so you can download it
4933 - name : Upload Build Artifact
5034 uses : actions/upload-artifact@v4
5135 with :
You can’t perform that action at this time.
0 commit comments