Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
133 changes: 116 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,109 @@ on:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
inputs:
run_macos_native:
description: 'Run macOS-only MAUI iOS and full KMP checks'
required: false
type: boolean
default: false

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
HUSKY: 0
NX_DAEMON: false
NX_NO_CLOUD: true
NX_DISABLE_DB: true

jobs:
js:
name: JS/TS packages
runs-on: ubuntu-latest
env:
HUSKY: 0
NX_DAEMON: false
NX_NO_CLOUD: true
NX_DISABLE_DB: true
runs-on: [self-hosted]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm install --ignore-scripts
- run: npm run build
- run: npm test
- run: npm ci --ignore-scripts
- run: npm run ci:js
- run: npm run examples:check

react-native:
name: React Native release check
runs-on: [self-hosted]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm ci --ignore-scripts
- run: npm run versions:check
- run: npm run release:check --workspace=packages/sdk-reactnative

flutter:
name: Flutter package
runs-on: ubuntu-latest
runs-on: [self-hosted]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- uses: android-actions/setup-android@v3
with:
packages: tools platform-tools build-tools;35.0.0 platforms;android-35
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.x'
channel: 'stable'
- name: Trust Flutter SDK checkout
run: git config --global --add safe.directory "$FLUTTER_ROOT"
- run: cd packages/sdk-flutter && flutter pub get
- run: cd packages/sdk-flutter && flutter analyze
- run: cd packages/sdk-flutter && flutter test

maui:
name: .NET MAUI SDK
maui-android:
name: .NET MAUI Android SDK
runs-on: [self-hosted]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- uses: android-actions/setup-android@v3
with:
packages: tools platform-tools build-tools;35.0.0 platforms;android-35
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Install MAUI workloads
run: dotnet workload install maui-android
- name: Restore
run: dotnet restore packages/sdk-maui/ScreebMaui.csproj -p:TargetFramework=net9.0-android
- name: Build Android
run: dotnet build packages/sdk-maui/ScreebMaui.csproj -f net9.0-android --no-restore
- name: Run unit tests
run: dotnet test packages/sdk-maui/tests/ScreebUtilsTests.csproj

maui-ios:
name: .NET MAUI iOS SDK
runs-on: macos-latest
if: ${{ github.event_name == 'workflow_dispatch' && inputs.run_macos_native }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Install MAUI workloads
run: dotnet workload install android ios
run: dotnet workload install ios
- name: Download Screeb iOS XCFramework
run: |
SCREEB_IOS_URL=$(curl -sL https://api.github.com/repos/ScreebApp/sdk-ios-public/releases/latest | python3 -c "import sys,json; print(next(a['browser_download_url'] for a in json.load(sys.stdin)['assets'] if a['name']=='Screeb.zip'))")
Expand All @@ -55,9 +117,46 @@ jobs:
cp -r /tmp/screeb_ios/Screeb.xcframework packages/sdk-maui/native/ios/
- name: Restore
run: dotnet restore packages/sdk-maui/ScreebMaui.csproj
- name: Build Android
run: dotnet build packages/sdk-maui/ScreebMaui.csproj -f net9.0-android --no-restore
- name: Build iOS
run: dotnet build packages/sdk-maui/ScreebMaui.csproj -f net9.0-ios --no-restore
- name: Run unit tests
run: dotnet test packages/sdk-maui/tests/ScreebUtilsTests.csproj

kmp-android:
name: Kotlin Multiplatform Android SDK
runs-on: [self-hosted]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- uses: android-actions/setup-android@v3
with:
packages: tools platform-tools build-tools;35.0.0 platforms;android-35
- name: Make gradlew executable
run: chmod +x packages/sdk-kmp/gradlew
- name: Build Android target
run: cd packages/sdk-kmp && ./gradlew assembleRelease testDebugUnitTest --no-daemon

kmp-full:
name: Kotlin Multiplatform full SDK
runs-on: macos-latest
if: ${{ github.event_name == 'workflow_dispatch' && inputs.run_macos_native }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Download Screeb iOS XCFramework
run: |
set -euo pipefail
SCREEB_IOS_SDK_VERSION=$(grep '^SCREEB_IOS_SDK_VERSION=' packages/sdk-kmp/gradle.properties | cut -d= -f2)
SCREEB_IOS_URL=$(curl -sL "https://api.github.com/repos/ScreebApp/sdk-ios-public/releases/tags/v${SCREEB_IOS_SDK_VERSION}" | python3 -c "import sys,json; print(next(a['browser_download_url'] for a in json.load(sys.stdin)['assets'] if a['name']=='Screeb.zip'))")
curl -sL "$SCREEB_IOS_URL" -o /tmp/Screeb.zip
unzip -q /tmp/Screeb.zip -d /tmp/screeb_ios
mkdir -p packages/sdk-kmp/native/ios
cp -r /tmp/screeb_ios/Screeb.xcframework packages/sdk-kmp/native/ios/
- name: Make gradlew executable
run: chmod +x packages/sdk-kmp/gradlew
- name: Build SDK
run: cd packages/sdk-kmp && ./gradlew clean build --no-daemon
5 changes: 3 additions & 2 deletions .github/workflows/publish-angular.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- run: npm install --ignore-scripts
- run: npm run build --workspace=packages/sdk-angular
- run: npm ci --ignore-scripts
- run: npm run versions:check
- run: npm run release:check --workspace=packages/sdk-angular
- run: npm publish --workspace=packages/sdk-angular --access public --provenance
5 changes: 3 additions & 2 deletions .github/workflows/publish-browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- run: npm install --ignore-scripts
- run: npm run build --workspace=packages/sdk-browser
- run: npm ci --ignore-scripts
- run: npm run versions:check
- run: npm run release:check --workspace=packages/sdk-browser
- run: npm publish --workspace=packages/sdk-browser --access public --provenance
5 changes: 5 additions & 0 deletions .github/workflows/publish-flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.x'
channel: 'stable'
- run: npm run versions:check
- name: Setup pub.dev credentials
run: |
mkdir -p ~/.config/dart
Expand All @@ -27,4 +31,5 @@ jobs:
}
EOF
- run: cd packages/sdk-flutter && flutter pub get
- run: cd packages/sdk-flutter && flutter analyze
- run: cd packages/sdk-flutter && flutter pub publish --force
48 changes: 48 additions & 0 deletions .github/workflows/publish-kmp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish Screeb KMP SDK

on:
push:
tags:
- 'sdk-kmp/v*'

jobs:
publish:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20'

- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- run: npm run versions:check

- name: Download Screeb iOS XCFramework
run: |
set -euo pipefail
SCREEB_IOS_SDK_VERSION=$(grep '^SCREEB_IOS_SDK_VERSION=' packages/sdk-kmp/gradle.properties | cut -d= -f2)
SCREEB_IOS_URL=$(curl -sL "https://api.github.com/repos/ScreebApp/sdk-ios-public/releases/tags/v${SCREEB_IOS_SDK_VERSION}" \
| python3 -c "import sys,json; print(next(a['browser_download_url'] for a in json.load(sys.stdin)['assets'] if a['name']=='Screeb.zip'))")
curl -sL "$SCREEB_IOS_URL" -o /tmp/Screeb.zip
unzip -q /tmp/Screeb.zip -d /tmp/screeb_ios
mkdir -p packages/sdk-kmp/native/ios
cp -r /tmp/screeb_ios/Screeb.xcframework packages/sdk-kmp/native/ios/
test -d packages/sdk-kmp/native/ios/Screeb.xcframework || (echo "XCFramework not found after download" && exit 1)

- name: Make gradlew executable
run: chmod +x packages/sdk-kmp/gradlew

- name: Publish to Maven Central
working-directory: packages/sdk-kmp
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
GPG_KEY: ${{ secrets.GPG_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
run: ./gradlew publishAllPublicationsToOSSRHRepository --no-daemon
6 changes: 6 additions & 0 deletions .github/workflows/publish-maui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20'

- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'

- run: npm run versions:check

- name: Install MAUI workloads
run: dotnet workload install android ios

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/publish-react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- run: npm install --ignore-scripts
- run: npm run build --workspace=packages/sdk-react
- run: npm ci --ignore-scripts
- run: npm run versions:check
- run: npm run release:check --workspace=packages/sdk-react
- run: npm publish --workspace=packages/sdk-react --access public --provenance
5 changes: 3 additions & 2 deletions .github/workflows/publish-reactnative.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- run: npm install --ignore-scripts
- run: npm run build --workspace=packages/sdk-reactnative
- run: npm ci --ignore-scripts
- run: npm run versions:check
- run: npm run release:check --workspace=packages/sdk-reactnative
- run: npm publish --workspace=packages/sdk-reactnative --access public --provenance
23 changes: 23 additions & 0 deletions .github/workflows/publish-svelte.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish @screeb/sdk-svelte

on:
push:
tags:
- 'sdk-svelte/v*'

jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- run: npm ci --ignore-scripts
- run: npm run versions:check
- run: npm run release:check --workspace=packages/sdk-svelte
- run: npm publish --workspace=packages/sdk-svelte --access public --provenance
5 changes: 3 additions & 2 deletions .github/workflows/publish-vue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- run: npm install --ignore-scripts
- run: npm run build --workspace=packages/sdk-vue
- run: npm ci --ignore-scripts
- run: npm run versions:check
- run: npm run release:check --workspace=packages/sdk-vue
- run: npm publish --workspace=packages/sdk-vue --access public --provenance
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ coverage
build
dist
storybook-static
.local/

# misc
.DS_Store
Expand All @@ -24,6 +25,7 @@ lerna-debug.log*
npm-debug.log*
yarn-debug.log*
yarn-error.log*
java_pid*.hprof

.npmrc
.idea
Expand All @@ -36,8 +38,40 @@ packages/sdk-maui/native/ios/Screeb.xcframework/
packages/sdk-maui/native/ios/Screeb.zip
packages/sdk-maui/native/ios/sdk-ios-public-*/

# KMP SDK - native binaries (downloaded/built at build time)
packages/sdk-kmp/native/ios/Screeb.xcframework/
packages/sdk-kmp/native/ios/Screeb.zip
packages/sdk-kmp/native/ios/sdk-ios-public-*/

# .NET build artifacts
obj/
packages/sdk-maui/bin/
packages/sdk-maui/obj/
packages/sdk-maui/tests/bin/
packages/sdk-maui/tests/obj/
examples/example-maui/bin/
examples/example-maui/obj/

# Android example build artifacts
examples/example-android/.gradle/
examples/example-android/build/
examples/example-android/app/build/
examples/example-android/local.properties

# Expo generated artifacts
examples/example-expo/.expo/
examples/example-expo/android/
examples/example-expo/ios/

# Android / Gradle generated files
**/.gradle/
**/.kotlin/
**/.cxx/
**/.externalNativeBuild/
**/local.properties
captures/

# iOS generated files
**/ios/Pods/
**/ios/build/
**/ios/.xcode.env.local
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
. "$(dirname -- "$0")/_/husky.sh"

npm run lint
npm run build:doc && git add -A packages/*/docs
npm run docs:reference:check
Loading
Loading