Build for all platforms #25
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: "Build for all platforms" | |
on: workflow_dispatch | |
jobs: | |
build_windows: | |
runs-on: windows-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
- run: dart run msix:create --install-certificate false | |
- name: Upload windows build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: otzaria.msix | |
path: build/windows/x64/runner/release/otzaria.msix | |
build_linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
- run: | | |
sudo apt-get update -y | |
sudo apt-get install -y ninja-build libgtk-3-dev libblkid1 liblzma5 | |
- run: flutter build linux | |
- name: zip the bundle | |
run: cd build/linux/x64/release/bundle/ && zip -r otzaria-linux.zip ./ | |
- name: Upload linux build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: otzaria-linux.zip | |
path: otzaria-linux.zip | |
build_android: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
- run: sudo apt install openjdk-18-jdk | |
- run: wget https://dl.google.com/dl/android/studio/ide-zips/2024.1.2.12/android-studio-2024.1.2.12-linux.tar.gz | |
- run: tar -zxvf android-studio-2024.1.2.12-linux.tar.gz | |
- run: sudo mv android-studio /opt/ | |
- run: sudo ln -sf /opt/android-studio/bin/studio.sh /bin/android-studio | |
- run: flutter doctor -v | |
- run: flutter pub get | |
- run: flutter build apk | |
- name: Upload apk | |
uses: actions/upload-artifact@v4 | |
with: | |
name: otzaria-android.apk | |
path: build/app/outputs/flutter-apk/app-release.apk | |
build_macos: | |
runs-on: macos-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
- run: flutter build macos | |
- name: Zip the app bundle | |
run: cd build/macos/Build/Products/Release && zip -r otzaria-macos.zip ./ | |
- name: Upload macos build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: otzaria-macos.zip | |
path: build/macos/Build/Products/Release/otzaria-macos.zip | |