Init using create-nitro-module

This commit is contained in:
2026-04-06 12:53:56 +02:00
commit b5a15a41e9
97 changed files with 6648 additions and 0 deletions
+56
View File
@@ -0,0 +1,56 @@
version: 2
enable-beta-ecosystems: true
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
labels:
- 'dependencies'
- package-ecosystem: 'gradle'
directories:
- '/android/'
- '/example/android/'
schedule:
interval: 'daily'
labels:
- 'nitro-core'
- 'nitrogen'
- 'dependencies'
- 'kotlin'
- package-ecosystem: 'bundler'
directory: '/example/'
schedule:
interval: 'daily'
labels:
- 'dependencies'
- 'ruby'
- package-ecosystem: 'npm'
directories:
- '/example/'
- '/'
schedule:
interval: 'daily'
labels:
- 'nitro-core'
- 'dependencies'
- 'typescript'
- 'nitrogen'
groups:
react-native-cli:
patterns:
- '@react-native-community/cli*'
babel:
patterns:
- '@babel/*'
react-native:
patterns:
- '@react-native/*'
nitro:
patterns:
- 'nitrogen'
- 'react-native-nitro-modules'
+71
View File
@@ -0,0 +1,71 @@
name: Build Android
permissions:
contents: read
on:
push:
branches:
- main
paths:
- '.github/workflows/android-build.yml'
- 'example/android/**'
- 'nitrogen/generated/shared/**'
- 'nitrogen/generated/android/**'
- 'cpp/**'
- 'android/**'
- '**/bun.lock'
- '**/react-native.config.js'
- '**/nitro.json'
pull_request:
paths:
- '.github/workflows/android-build.yml'
- 'example/android/**'
- '**/nitrogen/generated/shared/**'
- '**/nitrogen/generated/android/**'
- 'cpp/**'
- 'android/**'
- '**/bun.lock'
- '**/react-native.config.js'
- '**/nitro.json'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Android Example App
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies (bun)
run: bun install
- name: Setup JDK 17
uses: actions/setup-java@v5
with:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run Gradle build
working-directory: example/android
run: ./gradlew assembleDebug --no-daemon --build-cache
- name: Stop Gradle daemon
working-directory: example/android
run: ./gradlew --stop
+99
View File
@@ -0,0 +1,99 @@
name: Build iOS
permissions:
contents: read
on:
push:
branches:
- main
paths:
- '.github/workflows/ios-build.yml'
- 'example/ios/**'
- 'example/Gemfile'
- 'example/Gemfile.lock'
- '**/nitrogen/generated/shared/**'
- '**/nitrogen/generated/ios/**'
- 'cpp/**'
- 'ios/**'
- '**/Podfile.lock'
- '**/bun.lock'
- '**/*.podspec'
- '**/react-native.config.js'
- '**/nitro.json'
pull_request:
paths:
- '.github/workflows/ios-build.yml'
- 'example/ios/**'
- 'example/Gemfile'
- 'example/Gemfile.lock'
- '**/nitrogen/generated/shared/**'
- '**/nitrogen/generated/ios/**'
- 'cpp/**'
- 'ios/**'
- '**/Podfile.lock'
- '**/bun.lock'
- '**/*.podspec'
- '**/react-native.config.js'
- '**/nitro.json'
workflow_dispatch:
env:
USE_CCACHE: 1
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build iOS Example App
runs-on: macOS-15
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 16.4
- name: Install dependencies (bun)
run: bun install
- name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
working-directory: example/ios
- name: Install xcpretty
run: gem install xcpretty
- name: Cache CocoaPods
uses: actions/cache@v4
with:
path: |
~/.cocoapods/repos
example/ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('example/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install Pods
working-directory: example/ios
run: pod install
- name: Build App
working-directory: example/ios
run: |
set -o pipefail && xcodebuild \
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \
-derivedDataPath build -UseModernBuildSystem=YES \
-workspace OmniExample.xcworkspace \
-scheme OmniExample \
-sdk iphonesimulator \
-configuration Debug \
-destination 'platform=iOS Simulator,name=iPhone 16' \
build \
CODE_SIGNING_ALLOWED=NO | xcpretty
+55
View File
@@ -0,0 +1,55 @@
name: Release
on:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Bun.js
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Cache bun dependencies
id: bun-cache
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install npm dependencies (bun)
run: bun install
- name: Build lib
run: bun run build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
GIT_AUTHOR_NAME: ${{ github.actor }}
GIT_AUTHOR_EMAIL: '${{ github.actor }}@users.noreply.github.com'
GIT_COMMITTER_NAME: ${{ github.actor }}
GIT_COMMITTER_EMAIL: '${{ github.actor }}@users.noreply.github.com'
run: bun release