Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .github/workflows/reusable-build-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ on:
type: string
default: ''
secrets:
UNITY_LICENSE:
required: true
UNITY_EMAIL:
required: true
UNITY_PASSWORD:
required: true
UNITY_LICENSE:
required: false
UNITY_SERIAL:
required: false
outputs:
export-path:
description: 'Export path where the package was generated'
Expand Down Expand Up @@ -102,6 +104,19 @@ jobs:
fetch-depth: 0
lfs: true

- name: Set Unity License Environment
id: unity-license
run: |
if [ -n "${{ secrets.UNITY_LICENSE }}" ]; then
echo "name=UNITY_LICENSE" >> "$GITHUB_OUTPUT"
elif [ -n "${{ secrets.UNITY_SERIAL }}" ]; then
echo "name=UNITY_SERIAL" >> "$GITHUB_OUTPUT"
else
echo "::error::No license or serial found."
exit 1
fi
echo "::notice title=License::$name"

- uses: actions/cache@v4
with:
path: Library
Expand All @@ -110,9 +125,9 @@ jobs:

- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
${{ steps.license.outputs.name }}: ${{ secrets[steps.license.outputs.name] }}
with:
targetPlatform: StandaloneLinux64
unityVersion: ${{ inputs.unity-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-build-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:
build-package:
uses: ./.github/workflows/reusable-build-package.yaml
secrets:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
package-name: 'Test'
tag: '1.0.0'
Expand Down
Loading