-
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (52 loc) · 1.79 KB
/
test_zip.yml
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
name: Build windows zip
on:
workflow_dispatch:
env:
FLUTTER_VERSION: "3.13.9"
jobs:
build:
runs-on: ubuntu-20.04
outputs:
version: ${{ steps.get_version.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Get version from pubspec.yaml
id: get_version
run: |
VERSION=$(sed -n 's/^version: \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' app/pubspec.yaml)
echo "version=$VERSION" >> $GITHUB_OUTPUT
build_windows_zip:
needs: build
runs-on: windows-latest
steps:
- name: Fix long file paths
run: git config --system core.longpaths true
- name: Checkout repository
uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: "stable"
- name: Dependencies
working-directory: app
run: flutter pub get
- name: Compile for Windows
working-directory: app
run: flutter build windows
- name: Create empty settings.json
working-directory: app
run: echo {} > build/windows/runner/Release/settings.json
- name: Add DLL files
working-directory: app
run: |
Copy-Item ../scripts/windows/x64/msvcp140.dll build/windows/runner/Release/
Copy-Item ../scripts/windows/x64/vcruntime140.dll build/windows/runner/Release/
Copy-Item ../scripts/windows/x64/vcruntime140_1.dll build/windows/runner/Release/
- name: Zip compiled files
working-directory: app
run: Compress-Archive -Path build/windows/runner/Release/* -DestinationPath LocalSend.zip
- name: Upload zip
uses: actions/upload-artifact@v4
with:
name: windows-zip-x86-64-result
path: app/LocalSend.zip