mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
59 lines
1.7 KiB
YAML
59 lines
1.7 KiB
YAML
name: Build for Windows x64
|
|
|
|
on:
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-windows-app:
|
|
name: Release Windows x64
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
channel: stable
|
|
flutter-version-file: pubspec.yaml
|
|
|
|
- name: Add fastforge and Inno Setup
|
|
run: |
|
|
dart pub global activate fastforge
|
|
choco install innosetup
|
|
|
|
- name: Add Chinese language file for Inno Setup
|
|
run: |
|
|
Copy-Item "windows/packaging/exe/ChineseSimplified.isl" "C:\Program Files (x86)\Inno Setup 6\Languages\ChineseSimplified.isl"
|
|
shell: pwsh
|
|
|
|
- name: Set and Extract version
|
|
shell: pwsh
|
|
run: lib/scripts/build.ps1
|
|
|
|
- name: Build Windows
|
|
run: |
|
|
fastforge package --platform windows --targets exe --flutter-build-args="dart-define-from-file=pili_release.json"
|
|
|
|
- name: Prepare Upload
|
|
run: |
|
|
mkdir -p Release/PiliPlus-Win
|
|
mkdir -p PiliPlus-Win-Setup
|
|
mv build/windows/x64/runner/Release/* Release/PiliPlus-Win/
|
|
mv dist/**/*.exe PiliPlus-Win-Setup/PiliPlus_windows_${{env.version}}_x64_setup.exe
|
|
|
|
- name: Upload windows file release
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: PiliPlus_windows_${{env.version}}_x64
|
|
path: Release
|
|
|
|
- name: Upload windows setup release
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: windows-setup-x64-release
|
|
path: PiliPlus-Win-Setup
|