Skip to content

Commit ce420f9

Browse files
fadi-georgegithub-actions[bot]
andauthored
chore: Release 1.0.1 (#10)
Co-authored-by: github-actions[bot] <noreply@onesignal.com>
1 parent 1aa2528 commit ce420f9

20 files changed

Lines changed: 165 additions & 456 deletions

File tree

.github/actions/setup-demo/action.yml

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,33 @@ inputs:
1010
runs:
1111
using: 'composite'
1212
steps:
13-
- name: Set up Bun
14-
uses: oven-sh/setup-bun@v2
15-
16-
- name: Cache SDK bun dependencies
17-
uses: actions/cache@v5
13+
- name: Set up Vite+
14+
uses: voidzero-dev/setup-vp@v1
1815
with:
19-
path: node_modules
20-
key: bun-sdk-${{ runner.os }}-${{ hashFiles('bun.lock') }}
21-
restore-keys: bun-sdk-${{ runner.os }}-
16+
cache: true
17+
run-install: true
2218

23-
- name: Cache demo bun dependencies
19+
- name: Cache demo Vite+ dependencies
2420
uses: actions/cache@v5
2521
with:
2622
path: examples/demo/node_modules
27-
key: bun-demo-${{ runner.os }}-${{ hashFiles('examples/demo/bun.lock') }}
28-
restore-keys: bun-demo-${{ runner.os }}-
29-
30-
- name: Install SDK dependencies
31-
shell: bash
32-
run: bun install --frozen-lockfile
33-
34-
- name: Set up demo
35-
shell: bash
36-
working-directory: examples/demo
37-
run: bun run setup
23+
key: vp-demo-${{ runner.os }}-${{ hashFiles('examples/demo/bun.lock') }}
24+
restore-keys: vp-demo-${{ runner.os }}-
3825

26+
# Must precede `vp run setup`: the demo's setup.sh runs `vp run build`,
27+
# which inlines `import.meta.env.VITE_*` into the web bundle at build time.
28+
# Writing .env afterward leaves the bundle (and therefore the APK/IPA) with
29+
# fallback values like the default APP_ID.
3930
- name: Create demo .env
4031
shell: bash
4132
working-directory: examples/demo
4233
run: |
4334
echo "VITE_ONESIGNAL_APP_ID=${{ inputs.onesignal-app-id }}" > .env
4435
echo "VITE_ONESIGNAL_API_KEY=${{ inputs.onesignal-api-key }}" >> .env
36+
echo "VITE_ONESIGNAL_ANDROID_CHANNEL_ID=7ec2ece9-c538-4656-9516-1316f48a005c" >> .env
4537
echo "VITE_E2E_MODE=true" >> .env
38+
39+
- name: Install and set up demo
40+
shell: bash
41+
working-directory: examples/demo
42+
run: vp run setup

.github/workflows/cd.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,3 @@ jobs:
2222
GH_PUSH_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
2323
with:
2424
branch: ${{ github.event.pull_request.base.ref }}
25-
toolchain: vite-plus

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,3 @@ concurrency:
1111
jobs:
1212
call:
1313
uses: OneSignal/sdk-shared/.github/workflows/wrapper-js-ci.yml@main
14-
with:
15-
toolchain: vite-plus

.github/workflows/e2e.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,22 @@ jobs:
4646
onesignal-app-id: ${{ vars.APPIUM_ONESIGNAL_APP_ID }}
4747
onesignal-api-key: ${{ secrets.APPIUM_ONESIGNAL_API_KEY }}
4848

49-
- name: Build release APK
49+
- name: Build debug APK
5050
working-directory: examples/demo/android
51-
run: ./gradlew assembleRelease --quiet --console=plain --warning-mode=summary
51+
# Use the debug variant: Capacitor only calls
52+
# WebView.setWebContentsDebuggingEnabled(true) when BuildConfig.DEBUG
53+
# is true, which Appium needs to enter the WEBVIEW context (CSS /
54+
# data-testid selectors). Release APKs error with
55+
# "Failed to get sockets matching: @webview_devtools_remote_.*".
56+
# -PciSingleAbi → arm64-v8a-only APK; BrowserStack devices are all
57+
# arm64-v8a, so dropping other ABIs trims size with no test impact.
58+
run: ./gradlew assembleDebug -PciSingleAbi --quiet --console=plain --warning-mode=summary
5259

5360
- name: Upload APK
5461
uses: actions/upload-artifact@v7
5562
with:
5663
name: demo-apk
57-
path: examples/demo/android/app/build/outputs/apk/release/app-release.apk
64+
path: examples/demo/android/app/build/outputs/apk/debug/app-arm64-v8a-debug.apk
5865
retention-days: 1
5966
compression-level: 0
6067

@@ -92,6 +99,10 @@ jobs:
9299

93100
- name: Build signed IPA
94101
working-directory: examples/demo/ios/App
102+
# Release builds are fine for Appium because capacitor.config.ts sets
103+
# `ios.webContentsDebuggingEnabled: true`, which forces
104+
# WKWebView.isInspectable=true so the WEBVIEW_* context (and
105+
# data-testid selectors) remain available in Release IPAs.
95106
run: |
96107
xcodebuild archive \
97108
-project App.xcodeproj \
@@ -138,7 +149,7 @@ jobs:
138149
with:
139150
platform: android
140151
app-artifact: demo-apk
141-
app-filename: app-release.apk
152+
app-filename: app-arm64-v8a-debug.apk
142153
sdk-type: capacitor
143154
build-name: capacitor-android-${{ github.ref_name }}-${{ github.run_number }}
144155

OneSignalCapacitorPlugin.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ Pod::Spec.new do |s|
1616
s.swift_version = '5.9'
1717

1818
s.dependency 'Capacitor'
19-
s.dependency 'OneSignalXCFramework', '5.5.0'
19+
s.dependency 'OneSignalXCFramework', '5.5.1'
2020
end

android/gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ compileSdk = "35"
1414
junit = "4.13.2"
1515
kotlin = "1.9.25"
1616
minSdk = "23"
17-
onesignal = "5.7.7"
17+
onesignal = "5.8.1"
1818
targetSdk = "35"
1919

2020
[libraries]

examples/demo/android/app/build.gradle.kts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,23 @@ android {
2222
release {
2323
isMinifyEnabled = false
2424
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
25+
// Sign release with Android's auto-generated debug keystore so
26+
// `assembleRelease` produces an installable app-release.apk for
27+
// Appium E2E. Don't ship release builds to users this way.
28+
signingConfig = signingConfigs.getByName("debug")
29+
}
30+
}
31+
32+
// Opt-in via `-PciSingleAbi` to build an arm64-v8a-only APK for CI.
33+
// BrowserStack devices we test against are all arm64-v8a, so dropping
34+
// the other ABIs trims native libraries (Capacitor WebView shims and
35+
// plugin .so files) without affecting test coverage.
36+
splits {
37+
abi {
38+
isEnable = project.hasProperty("ciSingleAbi")
39+
reset()
40+
include("arm64-v8a")
41+
isUniversalApk = false
2542
}
2643
}
2744
}

0 commit comments

Comments
 (0)