-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update build workflows for Android and iOS
- Loading branch information
Showing
3 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Android Build | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
environment: | ||
required: false | ||
type: string | ||
default: release | ||
|
||
jobs: | ||
build-android: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: npm | ||
|
||
- name: Install Node modules | ||
run: npm ci | ||
|
||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 20 | ||
cache: gradle | ||
|
||
- name: Build Android (Release) | ||
if: inputs.environment == 'release' | ||
run: npm exec -- react-native build-android --tasks bundleRelease,assembleRelease | ||
|
||
- name: Build Android (Debug) | ||
if: inputs.environment == 'debug' | ||
run: npm exec -- react-native build-android --tasks bundleDebug,assembleDebug | ||
|
||
- name: Upload Android Bundle | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: app-${{inputs.environment}}.aab | ||
path: android/app/build/outputs/bundle/${{inputs.environment}}/app-${{inputs.environment}}.aab | ||
|
||
- name: Upload Android APK | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: app-${{inputs.environment}}.apk | ||
path: android/app/build/outputs/apk/${{inputs.environment}}/app-${{inputs.environment}}.apk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: iOS Build | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build-ios: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: npm | ||
|
||
- name: Install Node modules | ||
run: npm ci | ||
|
||
- name: Install CocoaPods | ||
run: bundle install | ||
|
||
- name: Install Pods | ||
run: bundle exec pod install | ||
working-directory: ios | ||
|
||
- name: Build iOS (Debug) | ||
run: npm exec -- react-native build-ios |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Pull Request | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
build-android: | ||
uses: ./.github/workflows/build-android.yml | ||
secrets: inherit | ||
build-ios: | ||
uses: ./.github/workflows/build-ios.yml | ||
secrets: inherit |