Skip to content

git: fixed workflow app paths #27

git: fixed workflow app paths

git: fixed workflow app paths #27

Workflow file for this run

name: Build and Release AnymeX
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
build-android:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: "adopt"
java-version: "17"
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.22.3"
- name: Get Dependencies
run: flutter pub get
- name: Build Android with Split ABI
run: flutter build apk --split-per-abi
- name: Rename and Upload APKs (Split ABI)
run: |
mv build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk build/app/outputs/flutter-apk/app-armeabi-v7a-release-split.apk
mv build/app/outputs/flutter-apk/app-arm64-v8a-release.apk build/app/outputs/flutter-apk/app-arm64-v8a-release-split.apk
mv build/app/outputs/flutter-apk/app-x86_64-release.apk build/app/outputs/flutter-apk/app-x86_64-release-split.apk
- name: Build Universal APK
run: flutter build apk --release
- name: Rename and Upload Universal APK
run: mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/app-release-universal.apk
- name: Upload Android Artifacts
uses: actions/upload-artifact@v3
with:
name: android-build
path: build/app/outputs/flutter-apk/*.apk
build-ios:
runs-on: macos-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.22.3"
- name: Get Dependencies
run: flutter pub get
- name: Build iOS (macOS only)
run: flutter build ios --release --no-codesign
- name: Compress iOS App Directory
run: |
cd build/ios/iphoneos
zip -r AnymeX-iOS.zip *.app
- name: Upload iOS Artifacts
uses: actions/upload-artifact@v3
with:
name: ios-build
path: build/ios/iphoneos/AnymeX-iOS.zip
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build cmake g++ libgtk-3-dev libblkid-dev liblzma-dev pkg-config libmpv-dev libwebkit2gtk-4.1-dev
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.22.3"
- name: Replace pubspec.yaml with Desktop Version
run: cp pubspec_desktop.yaml pubspec.yaml
- name: Get Dependencies
run: flutter pub get
- name: Build Linux
run: flutter build linux --release
- name: Upload Linux Artifact
uses: actions/upload-artifact@v3
with:
name: linux-build
path: build/linux/x64/release/bundle/*
build-windows:
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.22.3"
- name: Replace pubspec.yaml with Desktop Version
run: Copy-Item -Path pubspec_desktop.yaml -Destination pubspec.yaml -Force
- name: Get Dependencies
run: flutter pub get
- name: Build Windows
run: flutter build windows --release
- name: Create ZIP file for Windows Build
run: |
cd build/windows/x64/runner/Release
Compress-Archive -Path * -DestinationPath AnymeX_Windows.zip
- name: Upload Windows Artifact
uses: actions/upload-artifact@v3
with:
name: windows-build
path: build/windows/x64/runner/Release/AnymeX_Windows.zip
- name: Setup Inno Setup
run: |
choco install innosetup
- name: Build Installer with Inno Setup
run: |
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" inno.iss
release:
needs: [build-android, build-ios, build-linux, build-windows]
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref }}
name: Release ${{ github.ref }}
body: "Release for version ${{ github.ref }}"
draft: false
prerelease: false
- name: Upload Android APKs to GitHub Release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/app/outputs/flutter-apk/app-armeabi-v7a-release-split.apk
asset_name: AnymeX-armeabi-v7a.apk
asset_content_type: application/vnd.android.package-archive
- uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/app/outputs/flutter-apk/app-arm64-v8a-release-split.apk
asset_name: AnymeX-arm64-v8a.apk
asset_content_type: application/vnd.android.package-archive
- uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/app/outputs/flutter-apk/app-x86_64-release-split.apk
asset_name: AnymeX-x86_64.apk
asset_content_type: application/vnd.android.package-archive
- uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/app/outputs/flutter-apk/app-release-universal.apk
asset_name: AnymeX-universal.apk
asset_content_type: application/vnd.android.package-archive
- name: Upload iOS Artifacts to GitHub Release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/ios/iphoneos/AnymeX-iOS.zip
asset_name: AnymeX-iOS.zip
asset_content_type: application/zip
- name: Upload Windows ZIP to GitHub Release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/windows/x64/runner/Release/AnymeX_Windows.zip
asset_name: AnymeX-Windows.zip
asset_content_type: application/zip
- name: Upload Windows Installer to GitHub Release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: output/AnymeX-Setup.exe
asset_name: AnymeX-Setup.exe
asset_content_type: application/x-msdownload
- name: Upload Linux Artifact to GitHub Release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/linux/x64/release/bundle/*
asset_name: AnymeX-linux.zip
asset_content_type: application/zip