Skip to content

Commit 71fa1f4

Browse files
committed
add activation
1 parent d0484c6 commit 71fa1f4

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
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: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,21 @@ 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+
56+
string exportPath =
57+
exportPathArg != null
58+
? exportPathArg.Split('=')[1]
59+
: Path.Combine(Directory.GetCurrentDirectory(), packageName);
60+
61+
if (!exportPath.EndsWith(".unitypackage"))
62+
exportPath = Path.Combine(exportPath, packageName);
63+
5264
AssetDatabase.ExportPackage(
5365
_filePaths(),
54-
packageName,
66+
exportPath,
5567
ExportPackageOptions.Recurse | ExportPackageOptions.IncludeDependencies
5668
);
5769
}

0 commit comments

Comments
 (0)