Skip to content

Merge branch 'refs/heads/feature-lan' #48

Merge branch 'refs/heads/feature-lan'

Merge branch 'refs/heads/feature-lan' #48

Workflow file for this run

name: Multi-Platform Build
on:
push:
tags:
- '*'
jobs:
build_android_and_tv:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.0'
- run: flutter pub get
- name: Decode keystore
run: |
echo "${{ secrets.KEYSTORE_FILE }}" | base64 --decode > keystore.jks
# Build Android Mobile
- name: Build Android APK Mobile
run: flutter build apk --dart-define=isTV=false --release --split-per-abi
env:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_ALIAS_PASSWORD: ${{ secrets.KEY_ALIAS_PASSWORD }}
- name: Rename Android APK
run: mv build/app/outputs/flutter-apk/app-arm64-v8a-release.apk build/app/outputs/flutter-apk/easyTV-${{ github.ref_name }}.apk
# Build Android TV
- name: Build Android APK TV
run: flutter build apk --dart-define=isTV=true --release
env:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_ALIAS_PASSWORD: ${{ secrets.KEY_ALIAS_PASSWORD }}
- name: Rename Android APK
run: mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/easyTV-${{ github.ref_name }}-tv.apk
- name: Upload android_and_tv artifact
uses: actions/upload-artifact@v4
with:
name: android-and-tv-artifact
path: |
build/app/outputs/flutter-apk/easyTV-${{ github.ref_name }}.apk
build/app/outputs/flutter-apk/easyTV-${{ github.ref_name }}-tv.apk
build_ios_macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.0'
- run: flutter pub get
# Build iOS
- name: Build iOS
run: |
flutter build ios --dart-define=isTV=false --release --no-codesign
cd build/ios/iphoneos
mkdir Payload
mv Runner.app Payload/
zip -r easyTV-${{ github.ref_name }}.ipa Payload
# Build macOS
- name: Build macOS
run: |
flutter build macos --dart-define=isTV=false --release
cd build/macos/Build/Products/Release
zip -r easyTV-${{ github.ref_name }}-macos.zip *.app
- name: Upload ios-macos artifact
uses: actions/upload-artifact@v4
with:
name: ios-macos-artifact
path: |
build/ios/iphoneos/easyTV-${{ github.ref_name }}.ipa
build/macos/Build/Products/Release/easyTV-${{ github.ref_name }}-macos.zip
build_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.0'
- run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
sudo apt-get install -y libasound2-dev
- run: flutter config --enable-linux-desktop
- run: flutter pub get
- name: Build Linux
run: |
flutter build linux --dart-define=isTV=false --release
cd build/linux/x64/release/bundle
zip -r easyTV-${{ github.ref_name }}-linux.zip *
- name: Upload linux artifact
uses: actions/upload-artifact@v4
with:
name: linux-artifact
path: |
build/linux/x64/release/bundle/easyTV-${{ github.ref_name }}-linux.zip
build_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.0'
- run: flutter config --enable-windows-desktop
- run: flutter pub get
- name: Build Windows
run: |
flutter build windows --dart-define=isTV=false --release
cp windows/system32/* build/windows/x64/runner/Release/
ls -l build/windows/x64/runner/Release
cd build/windows/x64/runner/Release
7z a easyTV-${{ github.ref_name }}-windows.zip *
- name: Upload windows artifact
uses: actions/upload-artifact@v4
with:
name: windows-artifact
path: |
build/windows/x64/runner/Release/easyTV-${{ github.ref_name }}-windows.zip
create_release:
needs: [ build_linux, build_windows, build_android_and_tv, build_ios_macos ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download artifact artifact
uses: actions/download-artifact@v4
with:
path: release
merge-multiple: true
- name: display Release dir
run: |
realpath release
ls -l release
pwd
- name: Upload artifacts to Release
uses: softprops/action-gh-release@v2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: ${{ github.ref_name }}
draft: true
prerelease: false
files: |
./release/easyTV-${{ github.ref_name }}.apk
./release/ios/iphoneos/easyTV-${{ github.ref_name }}.ipa
./release/easyTV-${{ github.ref_name }}-tv.apk
./release/easyTV-${{ github.ref_name }}-linux.zip
./release/easyTV-${{ github.ref_name }}-windows.zip
./release/macos/Build/Products/Release/easyTV-${{ github.ref_name }}-macos.zip