mirror of
https://github.com/zoriya/react-native-omni.git
synced 2026-08-05 05:36:17 +00:00
Init using create-nitro-module
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user