File tree Expand file tree Collapse file tree 1 file changed +26
-4
lines changed Expand file tree Collapse file tree 1 file changed +26
-4
lines changed Original file line number Diff line number Diff line change 2929 type : string
3030 default : ' generateAdditionalMetrics;generateHtmlReport;generateBadgeReport'
3131 secrets :
32- UNITY_LICENSE :
33- required : true
3432 UNITY_EMAIL :
3533 required : true
3634 UNITY_PASSWORD :
3735 required : true
36+ UNITY_LICENSE :
37+ required : false
38+ UNITY_SERIAL :
39+ required : false
3840
3941jobs :
4042 print-unity-version :
6264 fi
6365 echo "::notice title=Test Modes::$array"
6466
67+ unity-license :
68+ runs-on : ubuntu-22.04
69+ outputs :
70+ name : ${{ steps.license.outputs.name }}
71+ steps :
72+ - name : Set Unity License Name
73+ id : license
74+ run : |
75+ if [ -n "${{ secrets.UNITY_LICENSE }}" ]; then
76+ license_name="UNITY_LICENSE"
77+ elif [ -n "${{ secrets.UNITY_SERIAL }}" ]; then
78+ license_name="UNITY_SERIAL"
79+ else
80+ echo "::error::No secrets.UNITY_LICENSE or secrets.UNITY_SERIAL found."
81+ exit 1
82+ fi
83+
84+ echo "name=$license_name" >> "$GITHUB_OUTPUT"
85+ echo "::notice title=License::$license_name"
86+
6587 test-all :
66- needs : [prepare-test-modes]
88+ needs : [prepare-test-modes, unity-license ]
6789 name : Test in ${{ matrix.testMode }}
6890 runs-on : ubuntu-22.04
6991 timeout-minutes : 15
86108 - uses : game-ci/unity-test-runner@v4
87109 id : tests
88110 env :
89- UNITY_LICENSE : ${{ secrets.UNITY_LICENSE }}
90111 UNITY_EMAIL : ${{ secrets.UNITY_EMAIL }}
91112 UNITY_PASSWORD : ${{ secrets.UNITY_PASSWORD }}
113+ ${{ needs.unity-license.outputs.name }} : ${{ secrets[needs.unity-license.outputs.name] }}
92114 with :
93115 unityVersion : ${{ inputs.unity-version }}
94116 projectPath : ${{ inputs.project-path }}
You can’t perform that action at this time.
0 commit comments