|
71 | 71 | sudo apt-get install -y gh jq || true |
72 | 72 | gh auth status || gh auth login --with-token <<< "$GH_TOKEN" |
73 | 73 |
|
74 | | - # to save time, use cached Unity installation if available |
75 | | - - name: Cache Unity |
76 | | - uses: actions/cache@v4 |
77 | | - with: |
78 | | - path: /home/runner/Unity/Hub |
79 | | - key: UnityEditor-${{ runner.os }} |
80 | | - restore-keys: | |
81 | | - UnityEditor-${{ runner.os }} |
82 | | -
|
83 | | - # setup Unity using the version file |
84 | | - - name: Setup Unity |
85 | | - uses: buildalon/unity-setup@v2.1.1 |
86 | | - with: |
87 | | - version-file: 'OneSignalExample/ProjectSettings/ProjectVersion.txt' |
88 | | - |
89 | | - # need to activate the Unity license to run Unity in batchmode; required for exportPackage |
90 | | - - uses: buildalon/activate-unity-license@v2 |
91 | | - with: |
92 | | - license: 'Personal' |
93 | | - username: '${{ secrets.UNITY_USERNAME }}' |
94 | | - password: '${{ secrets.UNITY_PASSWORD }}' |
95 | | - |
96 | 74 | - name: Get current native SDK versions |
97 | 75 | id: current_versions |
98 | 76 | run: | |
@@ -198,6 +176,28 @@ jobs: |
198 | 176 | sed -i "s/setSdkVersion:@\"[0-9]*\"/setSdkVersion:@\"${PADDED_VERSION}\"/" \ |
199 | 177 | com.onesignal.unity.ios/Runtime/Plugins/iOS/UIApplication+OneSignalUnity.mm |
200 | 178 |
|
| 179 | + # to save time, use cached Unity installation if available |
| 180 | + - name: Cache Unity |
| 181 | + uses: actions/cache@v4 |
| 182 | + with: |
| 183 | + path: /home/runner/Unity/Hub |
| 184 | + key: UnityEditor-${{ runner.os }} |
| 185 | + restore-keys: | |
| 186 | + UnityEditor-${{ runner.os }} |
| 187 | +
|
| 188 | + # setup Unity using the version file |
| 189 | + - name: Setup Unity |
| 190 | + uses: buildalon/unity-setup@v2.1.1 |
| 191 | + with: |
| 192 | + version-file: 'OneSignalExample/ProjectSettings/ProjectVersion.txt' |
| 193 | + |
| 194 | + # need to activate the Unity license to run Unity in batchmode; required for exportPackage |
| 195 | + - uses: buildalon/activate-unity-license@v2 |
| 196 | + with: |
| 197 | + license: 'Personal' |
| 198 | + username: '${{ secrets.UNITY_USERNAME }}' |
| 199 | + password: '${{ secrets.UNITY_PASSWORD }}' |
| 200 | + |
201 | 201 | - name: Cleaning up Unity locks |
202 | 202 | run: | |
203 | 203 | pkill -f Unity || true |
@@ -227,6 +227,8 @@ jobs: |
227 | 227 | git push |
228 | 228 |
|
229 | 229 | - name: Draft Release |
| 230 | + env: |
| 231 | + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
230 | 232 | run: | |
231 | 233 | package_path="OneSignalExample/OneSignal-v${{ inputs.unity_version }}.unitypackage" |
232 | 234 | gh release create "${{ inputs.unity_version }}" "${package_path}"\ |
|
0 commit comments