Skip to content

Commit 5d20966

Browse files
committed
add activation
1 parent d0484c6 commit 5d20966

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ jobs:
5757
with:
5858
version: 2021.3.0f1
5959

60+
- uses: buildalon/activate-unity-license@v2
61+
with:
62+
license: 'Personal'
63+
username: '${{ secrets.UNITY_USERNAME }}'
64+
password: '${{ secrets.UNITY_PASSWORD }}'
65+
6066
- name: Verify Unity install
6167
run: |
6268
UNITY_PATH=$(find /home/runner -type f -name Unity | grep "Editor/Unity" | head -n 1)

OneSignalExample/Assets/OneSignalPackager/Editor/OneSignalPackagePublisher.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ public static void ExportUnityPackage()
4949
var packageVersion = File.ReadAllText(VersionFilePath);
5050
var packageName = $"OneSignal-v{packageVersion}.unitypackage";
5151

52+
// detect CLI argument for exportPath
53+
string[] args = System.Environment.GetCommandLineArgs();
54+
string exportPathArg = args.FirstOrDefault(a => a.StartsWith("exportPath="));
55+
string exportPath = exportPathArg != null
56+
? exportPathArg.Split('=')[1]
57+
: Path.Combine(Directory.GetCurrentDirectory(), packageName);
58+
59+
if (!exportPath.EndsWith(".unitypackage"))
60+
exportPath = Path.Combine(exportPath, packageName);
61+
5262
AssetDatabase.ExportPackage(
5363
_filePaths(),
5464
packageName,

0 commit comments

Comments
 (0)