Skip to content

Merge pull request #158 from mumu-lhl/windows-improvement #589

Merge pull request #158 from mumu-lhl/windows-improvement

Merge pull request #158 from mumu-lhl/windows-improvement #589

Workflow file for this run

name: Flutter
on:
push:
paths-ignore:
- "**.md"
pull_request:
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
cache: true
- name: Install dependencies
run: flutter pub get
- name: Format
run: dart format --output=none --set-exit-if-changed .
- name: Analyze
run: flutter analyze
- name: Test
run: flutter test
build-android:
name: Build Android
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
cache: true
- uses: actions/setup-java@v4
with:
java-version: 21
distribution: "temurin"
- name: Install dependencies
run: |
sudo apt install -y libsqlite3-dev
flutter pub get
- name: Decode Keystore
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
if: ${{ env.KEYSTORE_BASE64 != '' }}
run: |
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > android/app/keystore.jks
- name: Create key.properties
env:
KEY_PROPERTIES: ${{ secrets.KEY_PROPERTIES }}
if: ${{ env.KEY_PROPERTIES != '' }}
run: |
echo "${{ secrets.KEY_PROPERTIES }}" > android/key.properties
- name: Build APK
run: flutter build apk
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Apk
path: |
build/app/outputs/flutter-apk/app-release.apk
build-windows:
name: Build Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
cache: true
- name: Install dependencies
run: flutter pub get
- name: Build exe
run: flutter build windows
- name: Copy DLLs
run: |
Copy-Item "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\14.42.34433\x64\Microsoft.VC143.CRT\vcruntime140.dll" build/windows/x64/runner/Release/
Copy-Item "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\14.42.34433\x64\Microsoft.VC143.CRT\vcruntime140_1.dll" build/windows/x64/runner/Release/
Copy-Item "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\14.42.34433\x64\Microsoft.VC143.CRT\msvcp140.dll" build/windows/x64/runner/Release/
- name: Compression
run: Compress-Archive -Path build/windows/x64/runner/Release/* -DestinationPath Ciyue.zip
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Windows
path: Ciyue.zip