Merge remote-tracking branch 'origin/main' into mobile #76
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
name: Mobile | |
on: | |
push: | |
branches: mobile | |
workflow_dispatch: | |
workflow_call: | |
inputs: | |
buildFlags: | |
required: false | |
type: string | |
jobs: | |
Mobile: | |
runs-on: ${{matrix.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-14] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
with: | |
ref: 'mobile' | |
- name: Setup Haxe | |
uses: krdlab/setup-haxe@master | |
with: | |
haxe-version: 4.3.6 | |
- name: Install Libraries | |
run: | | |
haxelib install hmm --quiet | |
haxelib run hmm install --quiet | |
- name: Configure Android | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
haxelib run lime config ANDROID_SDK $ANDROID_HOME | |
haxelib run lime config ANDROID_NDK_ROOT $ANDROID_NDK_LATEST_HOME | |
haxelib run lime config JAVA_HOME $JAVA_HOME_17_X64 | |
haxelib run lime config ANDROID_SETUP true | |
- name: Compile (Android) | |
if: startsWith(matrix.os, 'ubuntu') | |
run: haxelib run lime build android -D ${{ inputs.buildFlags }} | |
- name: Compile (iOS) | |
if: startsWith(matrix.os, 'macos') | |
run: haxelib run lime build ios -nosign -D ${{ inputs.buildFlags }} | |
- name: Make Ipa | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
cd export/release/ios/build/*-iphoneos | |
mkdir Payload | |
mv *.app Payload | |
zip -r JSEngine.ipa Payload | |
- name: Upload Artifact (Android) | |
if: startsWith(matrix.os, 'ubuntu') | |
uses: actions/upload-artifact@main | |
with: | |
name: androidBuild | |
path: export/release/android/bin/app/build/outputs/apk/release/*.apk | |
if-no-files-found: error | |
- name: Upload Artifact (iOS) | |
if: startsWith(matrix.os, 'macos') | |
uses: actions/upload-artifact@main | |
with: | |
name: iOSBuild | |
path: export/release/ios/build/Release-iphoneos/*.ipa | |
if-no-files-found: error |