This repository has been archived by the owner on Jun 18, 2024. It is now read-only.
Mobile + Release #3
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 + Release | |
on: workflow_dispatch | |
jobs: | |
Android: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- name: Setup Java JDK | |
uses: actions/setup-java@main | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Setup Haxe | |
uses: krdlab/setup-haxe@master | |
with: | |
haxe-version: 4.3.4 | |
- name: Install Libraries | |
run: | | |
haxelib install hmm --quiet | |
haxelib run hmm install --quiet | |
- name: Configure Android | |
run: | | |
haxelib run lime config ANDROID_SDK $ANDROID_HOME | |
haxelib run lime config ANDROID_NDK_ROOT $ANDROID_NDK_HOME | |
haxelib run lime config JAVA_HOME $JAVA_HOME | |
haxelib run lime config ANDROID_SETUP true | |
- name: Compile | |
run: haxelib run lime build android -D officialBuild -final | |
- name: Upload Artifact | |
uses: actions/upload-artifact@main | |
with: | |
name: androidBuild | |
path: export/release/android/bin/app/build/outputs/apk/debug/*.apk | |
if-no-files-found: error | |
iOS: | |
runs-on: macos-13 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
- name: Setup Haxe | |
uses: krdlab/setup-haxe@master | |
with: | |
haxe-version: 4.3.4 | |
- name: Install Libraries | |
run: | | |
haxelib setup ~/haxelib | |
haxelib install hmm --quiet | |
haxelib run hmm install --quiet | |
- name: Compile | |
run: haxelib run lime build ios -D officialBuild -final | |
- name: Make Ipa | |
run: | | |
cd export/release/ios/build/Release-iphoneos | |
mkdir Payload | |
mv *.app Payload | |
zip -r "Friday Night Bladin.ipa" Payload | |
- name: Make Zip For Release | |
run: | | |
cd export/release/ios/build/Release-iphoneos | |
zip "Friday Night Bladin-iOS.zip" "Friday Night Bladin.ipa" | |
- name: Upload Artifact | |
uses: actions/upload-artifact@main | |
with: | |
name: iOSBuild | |
path: export/release/ios/build/Release-iphoneos/*.zip | |
if-no-files-found: error | |
Releaser: | |
needs: [Android, iOS] | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Download Android Build | |
uses: actions/download-artifact@main | |
with: | |
name: androidBuild | |
path: /home/runner | |
- name: Move Android File | |
run: mv "/home/runner/Friday Night Bladin-debug.apk" "/home/runner/Friday Night Bladin-Android.apk" | |
- name: Download iOS Build | |
uses: actions/download-artifact@main | |
with: | |
name: iOSBuild | |
path: /home/runner | |
- name: Publish The Release | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: true | |
automatic_release_tag: "release" | |
title: "Release" | |
files: | | |
/home/runner/*.apk | |
/home/runner/*.zip |