Repository navigation
68 lines (68 loc) · 2.47 KB
/
Copy pathbuild_windows.yaml
File metadata and controls
68 lines (68 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Build Windows (Production)
on:
push:
branches: [ main ]
jobs:
build:
name: "Build"
runs-on: windows-2022
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
token: ${{ secrets.WQHUB_TOKEN }}
submodules: 'recursive'
- name: Update submodules
run: git submodule update --init --remote --recursive
- name: Find VC Redist Path
id: find_vcredist
shell: pwsh
run: |
$allPaths = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -find "VC\Redist\MSVC\**\x64\Microsoft.VC143.CRT\msvcp140.dll"
$standardPath = $allPaths | Where-Object {
$_ -like "*\x64\Microsoft.VC143.CRT\*" -and
$_ -notlike "*\spectre\*" -and
$_ -notlike "*\onecore\*"
} | Select-Object -First 1
if (-not $standardPath) {
$standardPath = $allPaths | Select-Object -First 1
}
$dir = [System.IO.Path]::GetDirectoryName($standardPath)
echo "VCRedistPath=$dir" >> $env:GITHUB_OUTPUT
echo "VC Redist dir: $dir"
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version-file: pubspec.yaml
- name: Install Flutter dependencies
run: flutter pub get
- name: Create debug symbols directory
run: mkdir -p out/windows
- name: Patch game client
run: |
rm lib/game_client/game_client_list.dart
mv lib/game_client/game_client_list.dart.PROD lib/game_client/game_client_list.dart
- name: Run tests
run: flutter test --exclude-tags=integration
- name: Build
env:
NO_OPUS_OGG_LIBS: 1
run: flutter build windows --obfuscate --split-debug-info=out/windows
- name: Copy setup description file
run: cp windows/setup.iss build/windows/
- name: Create setup
run: ISCC /DVCRedistPath="${{ steps.find_vcredist.outputs.VCRedistPath }}" /O"out" "build/windows/setup.iss"
- name: Upload Windows setup
uses: actions/upload-artifact@v4
with:
name: WeiqiHubSetup.exe
path: out/mysetup.exe
compression-level: 0
retention-days: 7
- name: Upload debug symbols
uses: actions/upload-artifact@v4
with:
name: debug-symbols-windows
path: out/windows
retention-days: 7