Skip to content

BUILD

BUILD #58

Workflow file for this run

name: "BUILD"
on:
workflow_dispatch:
jobs:
build_on_macos:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: "beta"
- name: Install Flutter Dependency
run: flutter pub get
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Flutter build ios
run: |
flutter build ios --release --no-codesign --verbose
chmod 777 unbitcode.sh
sh unbitcode.sh
mkdir -p Payload
mv ./build/ios/iphoneos/Runner.app Payload
zip -r -y Payload.zip Payload/Runner.app
mv Payload.zip AppRhyme.ipa
- name: Upload IPA
uses: actions/upload-artifact@v4
with:
name: AppRhyme.ipa
path: AppRhyme.ipa
compression-level: 9
- name: Flutter build macos
run: flutter build macos --release --verbose
- name: Upload Macos app
uses: actions/upload-artifact@v4
with:
name: AppRhyme-macos-release-unknown.zip
path: build/macos/Build/Products/Release/*.app
- name: Install tree
run: brew install tree
- name: Print directory tree
run: tree build/macos/Build/Products/
- name: Package Executable
run:
mkdir -p build/app/
zip -r "build/app/AppRhyme-macos-release-unknown.zip" "build/macos/Build/Products/Release/AppRhyme.app"
build_on_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: "beta"
- name: Install Flutter Dependency
run: flutter pub get
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Linux dependency
run: |
sudo apt-get update -y
sudo apt install libwebkit2gtk-4.1-dev
sudo apt-get install -y ninja-build libgtk-3-dev
sudo apt-get install libasound2-dev
- name: Flutter build linux
run: flutter build linux --release --verbose
- name: Package Executable
run: 7z a -r "../../../../../build/app/AppRhyme-linux-release-amd64.zip" *
working-directory: build/linux/x64/release/bundle
- name: Upload Linux app
uses: actions/upload-artifact@v4
with:
name: AppRhyme-linux-release-amd64
path: build/app/AppRhyme-linux-release-amd64.zip
build_on_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: "beta"
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Install Flutter Dependency
run: flutter pub get
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Cargo-Ndk
run: cargo install cargo-ndk --version 2.11.0 --force
- name: Install android ndk
uses: nttld/setup-ndk@v1
id: install-ndk
with:
ndk-version: r22b
- name: Flutter build windows
run: flutter build windows --release --verbose
- name: Package Executable
run: 7z a -r -sse "..\..\..\..\..\build\app\AppRhyme-win-release-amd64.zip" *
working-directory: build\windows\x64\runner\Release
- name: Upload files
uses: actions/upload-artifact@v4
with:
name: AppRhyme-win-release-amd64
path: build/app/AppRhyme-win-release-amd64.zip
- name: Flutter build apk abi
run: flutter build apk --release --split-per-abi --verbose
- name: Flutter build apk
run: flutter build apk --release --verbose
- name: Upload APK1
uses: actions/upload-artifact@v4
with:
name: AppRhyme-arm64-v8a-release.apk
path: build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
compression-level: 9
- name: Upload APK2
uses: actions/upload-artifact@v4
with:
name: AppRhyme-armeabi-v7a-release.apk
path: build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk
compression-level: 9
- name: Upload APK3
uses: actions/upload-artifact@v4
with:
name: AppRhyme-x86_64-release.apk
path: build/app/outputs/flutter-apk/app-x86_64-release.apk
compression-level: 9
- name: Upload APK4
uses: actions/upload-artifact@v4
with:
name: AppRhyme-unknown-release.apk
path: build/app/outputs/flutter-apk/app-release.apk
compression-level: 9
- name: Rename APKs
run: |
mv build/app/outputs/flutter-apk/app-arm64-v8a-release.apk build/app/outputs/flutter-apk/AppRhyme-arm64-v8a-release.apk
mv build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk build/app/outputs/flutter-apk/AppRhyme-armeabi-v7a-release.apk
mv build/app/outputs/flutter-apk/app-x86_64-release.apk build/app/outputs/flutter-apk/AppRhyme-x86_64-release.apk
mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/AppRhyme-unknown-release.apk