diff --git a/.github/workflows/create-release-pr.yml b/.github/workflows/create-release-pr.yml new file mode 100644 index 000000000..57954c37d --- /dev/null +++ b/.github/workflows/create-release-pr.yml @@ -0,0 +1,128 @@ +name: Create Unity Release PR + +on: + workflow_dispatch: + inputs: + bump_command: + description: "Version bump type (major, minor, patch, specify)" + required: true + type: choice + options: + - major + - minor + - patch + - specify + postfix: + description: "Optional postfix (e.g. preview, beta, or specific version when using 'specify')" + required: false + type: string + +permissions: + contents: write + pull-requests: write + +jobs: + compose-unity-release: + name: Compose Unity Release + runs-on: ubuntu-latest + timeout-minutes: 30 + + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BUMP_COMMAND: ${{ github.event.inputs.bump_command }} + POSTFIX: ${{ github.event.inputs.postfix }} + + steps: + - name: 📦 Checkout Repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Display Configuration + run: | + echo "============================================" + echo "🎮 Unity SDK Release Composition" + echo "🧩 Bump Command: $BUMP_COMMAND" + echo "🏷️ Postfix: $POSTFIX" + echo "============================================" + + - name: Prepare Environment + run: | + brew install gh jq || true + gh auth status || gh auth login --with-token <<< "$GH_TOKEN" + + - name: Run composeRelease.sh + run: | + chmod +x ./composeRelease.sh + if [[ -n "$POSTFIX" ]]; then + ./composeRelease.sh "$BUMP_COMMAND" "$POSTFIX" || echo "composeRelease.sh failed, continuing to patch manually" + else + ./composeRelease.sh "$BUMP_COMMAND" || echo "composeRelease.sh failed, continuing to patch manually" + fi + + - name: Detect New Version + id: version + run: | + VERSION=$(cat OneSignalExample/Assets/OneSignal/VERSION) + echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "✅ Detected new version: $VERSION" + + - name: 💾 Apply Version Changes and Commit + run: | + set -e + VERSION=${{ env.VERSION }} + echo "🔧 Updating version references to $VERSION" + + git fetch origin "release/$VERSION" + git checkout "release/$VERSION" || git checkout -b "release/$VERSION" + + # Extract current version for replacement + CURRENT=$(grep -Eo '[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?' OneSignalExample/Assets/OneSignal/VERSION | head -n 1) + echo "Detected previous version: $CURRENT" + + # 1️⃣ Update OneSignal.cs + sed -i '' "s/Version = \".*\";/Version = \"$VERSION\";/" com.onesignal.unity.core/Runtime/OneSignal.cs + + # 2️⃣ Update OneSignalPlatform.cs header + OLD_HEADER=$(printf "%02d%02d%02d" $(echo $CURRENT | tr '.' ' ')) + NEW_HEADER=$(printf "%02d%02d%02d" $(echo $VERSION | tr '.' ' ')) + sed -i '' "s/VersionHeader = \".*\";/VersionHeader = \"$NEW_HEADER\";/" com.onesignal.unity.core/Runtime/OneSignalPlatform.cs + + # 3️⃣ Update UIApplication+OneSignalUnity.mm iOS header + sed -i '' "s/setSdkVersion:@\".*\"];$/setSdkVersion:@\"$NEW_HEADER\"];/" com.onesignal.unity.ios/Runtime/Plugins/iOS/UIApplication+OneSignalUnity.mm + + # 4️⃣ Update all package.json versions + find . -path "*/package.json" -exec sed -i '' "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" {} \; + find . -path "*/package.json" -exec sed -i '' "s/\"com.onesignal.unity.core\": \".*\"/\"com.onesignal.unity.core\": \"$VERSION\"/" {} \; + + # 5️⃣ Update packages-lock.json + sed -i '' "s/\"com.onesignal.unity.core\": \".*\"/\"com.onesignal.unity.core\": \"$VERSION\"/" OneSignalExample/Packages/packages-lock.json + + # 6️⃣ Update .asmdef version expressions + find OneSignalExample/Assets/OneSignal -name "*.asmdef" -exec sed -i '' "s/\"expression\": \".*\"/\"expression\": \"$VERSION\"/" {} \; + + # 7️⃣ Update CHANGELOG.md section + CHANGELOG="OneSignalExample/Assets/OneSignal/CHANGELOG.md" + if grep -q "\[Unreleased\]" "$CHANGELOG"; then + sed -i '' "s/## \[Unreleased\]/## [Unreleased]\n## [$VERSION]/" "$CHANGELOG" + fi + + echo "✅ Version updates applied." + + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + git add . + git commit -m "chore(release): update version files for $VERSION" || echo "No changes to commit" + git push origin "release/$VERSION" + + - name: 🔍 Confirm PR Exists + run: | + PR_URL=$(gh pr list --head "release/$VERSION" --json url --jq '.[0].url') + if [[ -n "$PR_URL" ]]; then + echo "✅ Release PR found: $PR_URL" + else + echo "⚠️ No PR found. composeRelease.sh should have created one." + echo "If missing, create manually from release/$VERSION → main." + fi diff --git a/OneSignalExample/Assets/OneSignal/Attribution/OneSignal.UnityPackage.Attribution.asmdef b/OneSignalExample/Assets/OneSignal/Attribution/OneSignal.UnityPackage.Attribution.asmdef index a82956cd8..954c418d9 100644 --- a/OneSignalExample/Assets/OneSignal/Attribution/OneSignal.UnityPackage.Attribution.asmdef +++ b/OneSignalExample/Assets/OneSignal/Attribution/OneSignal.UnityPackage.Attribution.asmdef @@ -16,7 +16,7 @@ "versionDefines": [ { "name": "com.onesignal.unity.core", - "expression": "5.1.15", + "expression": "5.1.16", "define": "ONE_SIGNAL_INSTALLED" } ], diff --git a/OneSignalExample/Assets/OneSignal/CHANGELOG.md b/OneSignalExample/Assets/OneSignal/CHANGELOG.md index 2fd43a785..b3191b18a 100644 --- a/OneSignalExample/Assets/OneSignal/CHANGELOG.md +++ b/OneSignalExample/Assets/OneSignal/CHANGELOG.md @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [5.1.16] ## [5.1.15] ### Changed - Updated included Android SDK from 5.1.31 to [5.1.37](https://github.com/OneSignal/OneSignal-Android-SDK/releases/tag/5.1.37) @@ -483,7 +484,8 @@ If you run into any problems, please don’t hesitate to [open an issue](https:/ - If you are updating from a previous version of the OneSignal Unity SDK please follow the Unity Asset Store instructions in the [README](https://github.com/OneSignal/OneSignal-Unity-SDK/README.md#unity-asset-store) to ensure a smooth transition. -[Unreleased]: https://github.com/OneSignal/OneSignal-Unity-SDK/compare/5.1.15...HEAD +[Unreleased]: https://github.com/OneSignal/OneSignal-Unity-SDK/compare/5.1.16...HEAD +[5.1.16]: https://github.com/OneSignal/OneSignal-Unity-SDK/compare/5.1.15...5.1.16 [5.1.15]: https://github.com/OneSignal/OneSignal-Unity-SDK/compare/5.1.14...5.1.15 [5.1.14]: https://github.com/OneSignal/OneSignal-Unity-SDK/compare/5.1.13...5.1.14 [5.1.13]: https://github.com/OneSignal/OneSignal-Unity-SDK/compare/5.1.12...5.1.13 diff --git a/OneSignalExample/Assets/OneSignal/Editor/OneSignal.UnityPackage.Editor.asmdef b/OneSignalExample/Assets/OneSignal/Editor/OneSignal.UnityPackage.Editor.asmdef index d90ee149f..e02effcb1 100644 --- a/OneSignalExample/Assets/OneSignal/Editor/OneSignal.UnityPackage.Editor.asmdef +++ b/OneSignalExample/Assets/OneSignal/Editor/OneSignal.UnityPackage.Editor.asmdef @@ -16,7 +16,7 @@ "versionDefines": [ { "name": "com.onesignal.unity.core", - "expression": "5.1.15", + "expression": "5.1.16", "define": "ONE_SIGNAL_INSTALLED" } ], diff --git a/OneSignalExample/Assets/OneSignal/Example/OneSignal.UnityPackage.Example.asmdef b/OneSignalExample/Assets/OneSignal/Example/OneSignal.UnityPackage.Example.asmdef index e99841511..ade4035fe 100644 --- a/OneSignalExample/Assets/OneSignal/Example/OneSignal.UnityPackage.Example.asmdef +++ b/OneSignalExample/Assets/OneSignal/Example/OneSignal.UnityPackage.Example.asmdef @@ -18,7 +18,7 @@ "versionDefines": [ { "name": "com.onesignal.unity.core", - "expression": "5.1.15", + "expression": "5.1.16", "define": "ONE_SIGNAL_INSTALLED" } ], diff --git a/OneSignalExample/Assets/OneSignal/VERSION b/OneSignalExample/Assets/OneSignal/VERSION index 40dc92612..16cf70e74 100755 --- a/OneSignalExample/Assets/OneSignal/VERSION +++ b/OneSignalExample/Assets/OneSignal/VERSION @@ -1 +1 @@ -5.1.15 \ No newline at end of file +5.1.16 \ No newline at end of file diff --git a/OneSignalExample/Packages/packages-lock.json b/OneSignalExample/Packages/packages-lock.json index ff60483fa..e347c0672 100644 --- a/OneSignalExample/Packages/packages-lock.json +++ b/OneSignalExample/Packages/packages-lock.json @@ -5,7 +5,7 @@ "depth": 0, "source": "local", "dependencies": { - "com.onesignal.unity.core": "5.1.15" + "com.onesignal.unity.core": "5.1.16" } }, "com.onesignal.unity.core": { @@ -19,11 +19,11 @@ "depth": 0, "source": "local", "dependencies": { - "com.onesignal.unity.core": "5.1.15" + "com.onesignal.unity.core": "5.1.16" } }, "com.unity.ai.navigation": { - "version": "1.1.5", + "version": "1.1.4", "depth": 0, "source": "registry", "dependencies": { @@ -45,7 +45,7 @@ "url": "https://packages.unity.com" }, "com.unity.ide.rider": { - "version": "3.0.35", + "version": "3.0.24", "depth": 0, "source": "registry", "dependencies": { @@ -54,7 +54,7 @@ "url": "https://packages.unity.com" }, "com.unity.ide.visualstudio": { - "version": "2.0.22", + "version": "2.0.18", "depth": 0, "source": "registry", "dependencies": { @@ -97,7 +97,7 @@ "url": "https://packages.unity.com" }, "com.unity.textmeshpro": { - "version": "3.0.7", + "version": "3.0.6", "depth": 0, "source": "registry", "dependencies": { @@ -106,7 +106,7 @@ "url": "https://packages.unity.com" }, "com.unity.timeline": { - "version": "1.7.7", + "version": "1.7.5", "depth": 0, "source": "registry", "dependencies": { diff --git a/OneSignalExample/ProjectSettings/ProjectSettings.asset b/OneSignalExample/ProjectSettings/ProjectSettings.asset index b79c27ffe..c012614dd 100644 --- a/OneSignalExample/ProjectSettings/ProjectSettings.asset +++ b/OneSignalExample/ProjectSettings/ProjectSettings.asset @@ -48,7 +48,6 @@ PlayerSettings: defaultScreenHeightWeb: 600 m_StereoRenderingPath: 0 m_ActiveColorSpace: 0 - unsupportedMSAAFallback: 0 m_SpriteBatchVertexThreshold: 300 m_MTRendering: 1 mipStripping: 0 @@ -76,8 +75,6 @@ PlayerSettings: androidMinimumWindowWidth: 400 androidMinimumWindowHeight: 300 androidFullscreenMode: 1 - androidAutoRotationBehavior: 1 - androidPredictiveBackSupport: 0 defaultIsNativeResolution: 1 macRetinaSupport: 1 runInBackground: 1 @@ -85,7 +82,6 @@ PlayerSettings: muteOtherAudioSources: 0 Prepare IOS For Recording: 0 Force IOS Speakers When Recording: 0 - audioSpatialExperience: 0 deferSystemGesturesMode: 0 hideHomeButton: 0 submitAnalytics: 1 @@ -139,9 +135,7 @@ PlayerSettings: vulkanEnableLateAcquireNextImage: 0 vulkanEnableCommandBufferRecycling: 1 loadStoreDebugModeEnabled: 0 - visionOSBundleVersion: 1.0 - tvOSBundleVersion: 1.0 - bundleVersion: 5.1.15 + bundleVersion: 5.1.16 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0 @@ -153,7 +147,6 @@ PlayerSettings: isWsaHolographicRemotingEnabled: 0 enableFrameTimingStats: 0 enableOpenGLProfilerGPURecorders: 1 - allowHDRDisplaySupport: 0 useHDRDisplay: 0 hdrBitDepth: 0 m_ColorGamuts: 00000000 @@ -188,10 +181,8 @@ PlayerSettings: strictShaderVariantMatching: 0 VertexChannelCompressionMask: 4054 iPhoneSdkVersion: 988 - iOSSimulatorArchitecture: 0 iOSTargetOSVersionString: 12.0 tvOSSdkVersion: 0 - tvOSSimulatorArchitecture: 0 tvOSRequireExtendedGameController: 0 tvOSTargetOSVersionString: 12.0 VisionOSSdkVersion: 0 @@ -238,7 +229,6 @@ PlayerSettings: iOSMetalForceHardShadows: 0 metalEditorSupport: 1 metalAPIValidation: 1 - metalCompileShaderBinary: 0 iOSRenderExtraFrameOnPause: 0 iosCopyPluginsCodeInsteadOfSymlink: 0 appleDeveloperTeamID: @@ -523,6 +513,7 @@ PlayerSettings: switchScreenResolutionBehavior: 2 switchUseCPUProfiler: 0 switchEnableFileSystemTrace: 0 + switchUseGOLDLinker: 0 switchLTOSetting: 0 switchApplicationID: 0x01004b9000490000 switchNSODependencies: @@ -652,7 +643,7 @@ PlayerSettings: switchSocketBufferEfficiency: 4 switchSocketInitializeEnabled: 1 switchNetworkInterfaceManagerInitializeEnabled: 1 - switchDisableHTCSPlayerConnection: 0 + switchPlayerConnectionEnabled: 1 switchUseNewStyleFilepaths: 0 switchUseLegacyFmodPriorities: 0 switchUseMicroSleepForYield: 1 @@ -823,7 +814,6 @@ PlayerSettings: metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} metroSplashScreenUseBackgroundColor: 0 - syncCapabilities: 0 platformCapabilities: {} metroTargetDeviceFamilies: {} metroFTAName: diff --git a/com.onesignal.unity.android/package.json b/com.onesignal.unity.android/package.json index e92df9e18..b2ae43f2d 100644 --- a/com.onesignal.unity.android/package.json +++ b/com.onesignal.unity.android/package.json @@ -1,11 +1,11 @@ { "name": "com.onesignal.unity.android", "displayName": "OneSignal Unity SDK - Android", - "version": "5.1.15", + "version": "5.1.16", "unity": "2018.4", "description": "OneSignal is the market leader in customer engagement, powering mobile push, web push, email, and in-app messages.", "dependencies": { - "com.onesignal.unity.core": "5.1.15" + "com.onesignal.unity.core": "5.1.16" }, "keywords": [ "push-notifications", diff --git a/com.onesignal.unity.core/Runtime/OneSignal.cs b/com.onesignal.unity.core/Runtime/OneSignal.cs index 60e43c492..a2a35cbe7 100755 --- a/com.onesignal.unity.core/Runtime/OneSignal.cs +++ b/com.onesignal.unity.core/Runtime/OneSignal.cs @@ -42,7 +42,7 @@ namespace OneSignalSDK /// public static partial class OneSignal { - public const string Version = "5.1.15"; + public const string Version = "5.1.16"; /// /// The default static instance of the OneSignal Unity SDK diff --git a/com.onesignal.unity.core/Runtime/OneSignalPlatform.cs b/com.onesignal.unity.core/Runtime/OneSignalPlatform.cs index 34d1420f8..fbb21f472 100644 --- a/com.onesignal.unity.core/Runtime/OneSignalPlatform.cs +++ b/com.onesignal.unity.core/Runtime/OneSignalPlatform.cs @@ -40,7 +40,7 @@ namespace OneSignalSDK { public abstract class OneSignalPlatform { - public const string VersionHeader = "050115"; + public const string VersionHeader = "050116"; internal static event Action OnInitialize; diff --git a/com.onesignal.unity.core/package.json b/com.onesignal.unity.core/package.json index 5411e1d92..5f3438609 100644 --- a/com.onesignal.unity.core/package.json +++ b/com.onesignal.unity.core/package.json @@ -1,7 +1,7 @@ { "name": "com.onesignal.unity.core", "displayName": "OneSignal Unity SDK - Core", - "version": "5.1.15", + "version": "5.1.16", "unity": "2018.4", "description": "OneSignal is the market leader in customer engagement, powering mobile push, web push, email, and in-app messages.", "dependencies": { diff --git a/com.onesignal.unity.ios/Runtime/Plugins/iOS/UIApplication+OneSignalUnity.mm b/com.onesignal.unity.ios/Runtime/Plugins/iOS/UIApplication+OneSignalUnity.mm index 651acf37b..84337fca6 100644 --- a/com.onesignal.unity.ios/Runtime/Plugins/iOS/UIApplication+OneSignalUnity.mm +++ b/com.onesignal.unity.ios/Runtime/Plugins/iOS/UIApplication+OneSignalUnity.mm @@ -97,7 +97,7 @@ - (void)setOneSignalUnityDelegate:(id )delegate { - (BOOL)oneSignalApplication:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [OneSignalWrapper setSdkType:@"unity"]; - [OneSignalWrapper setSdkVersion:@"050115"]; + [OneSignalWrapper setSdkVersion:@"050116"]; [OneSignal initialize:nil withLaunchOptions:launchOptions]; if ([self respondsToSelector:@selector(oneSignalApplication:didFinishLaunchingWithOptions:)]) diff --git a/com.onesignal.unity.ios/package.json b/com.onesignal.unity.ios/package.json index b1b1c8a24..a1b08c49b 100644 --- a/com.onesignal.unity.ios/package.json +++ b/com.onesignal.unity.ios/package.json @@ -1,11 +1,11 @@ { "name": "com.onesignal.unity.ios", "displayName": "OneSignal Unity SDK - iOS", - "version": "5.1.15", + "version": "5.1.16", "unity": "2018.4", "description": "OneSignal is the market leader in customer engagement, powering mobile push, web push, email, and in-app messages.", "dependencies": { - "com.onesignal.unity.core": "5.1.15" + "com.onesignal.unity.core": "5.1.16" }, "keywords": [ "push-notifications",