Skip to content

Commit 2ca6755

Browse files
committed
cache unity editor
1 parent 4826000 commit 2ca6755

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/create-release-pr.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ permissions:
2424
jobs:
2525
compose-unity-release:
2626
name: Compose Unity Release
27-
runs-on: ubuntu-latest
27+
runs-on: macos-latest
2828

2929
env:
3030
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -43,10 +43,18 @@ jobs:
4343
brew install gh jq || true
4444
gh auth status || gh auth login --with-token <<< "$GH_TOKEN"
4545
46+
- name: Cache Unity
47+
uses: actions/cache@v4
48+
with:
49+
path: /Applications/Unity/Hub
50+
key: UnityEditor-${{ runner.os }}
51+
restore-keys: |
52+
UnityEditor-${{ runner.os }}
53+
4654
- name: Setup Unity
4755
uses: buildalon/[email protected]
4856
with:
49-
unity-version: 2021.3.0f1
57+
version-file: 'OneSignalExample/ProjectSettings/ProjectVersion.txt'
5058

5159
- uses: buildalon/activate-unity-license@v2
5260
with:
@@ -56,7 +64,7 @@ jobs:
5664

5765
- name: Verify Unity install
5866
run: |
59-
UNITY_PATH=$(find /home/runner -type f -name Unity | grep "Editor/Unity" | head -n 1)
67+
UNITY_PATH=$(find /Applications/Unity/Hub -type f -name Unity | grep "Editor/Unity" | head -n 1)
6068
echo "Unity found at: $UNITY_PATH"
6169
$UNITY_PATH -version
6270

0 commit comments

Comments
 (0)