Skip to content

Commit 08d2719

Browse files
committed
add github token for drafting release
1 parent 9920020 commit 08d2719

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed

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

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -71,28 +71,6 @@ jobs:
7171
sudo apt-get install -y gh jq || true
7272
gh auth status || gh auth login --with-token <<< "$GH_TOKEN"
7373
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-
9674
- name: Get current native SDK versions
9775
id: current_versions
9876
run: |
@@ -198,6 +176,28 @@ jobs:
198176
sed -i "s/setSdkVersion:@\"[0-9]*\"/setSdkVersion:@\"${PADDED_VERSION}\"/" \
199177
com.onesignal.unity.ios/Runtime/Plugins/iOS/UIApplication+OneSignalUnity.mm
200178
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+
201201
- name: Cleaning up Unity locks
202202
run: |
203203
pkill -f Unity || true
@@ -227,6 +227,8 @@ jobs:
227227
git push
228228
229229
- name: Draft Release
230+
env:
231+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
230232
run: |
231233
package_path="OneSignalExample/OneSignal-v${{ inputs.unity_version }}.unitypackage"
232234
gh release create "${{ inputs.unity_version }}" "${package_path}"\

0 commit comments

Comments
 (0)