Skip to content

Commit 3b1402f

Browse files
Add workflows for Windows (#1)
- Add a workflow for compiling on each commit (to master) - Add a workflow for creating release assets
1 parent d0d8a8e commit 3b1402f

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Create release binaries for the platforms
2+
3+
on:
4+
push:
5+
pull_request:
6+
types: [opened, synchronize, reopened]
7+
8+
jobs:
9+
build_windows:
10+
runs-on: windows-latest
11+
steps:
12+
- name: Check out repository
13+
uses: actions/[email protected]
14+
- name: Install Flutter
15+
uses: subosito/[email protected]
16+
with:
17+
flutter-version: '2.2.2'
18+
- name: Enable desktop support
19+
run: flutter config --enable-windows-desktop
20+
- name: Build Windows app
21+
run: flutter build windows
22+
- name: Copy VC redistributables
23+
run: |
24+
Copy-Item (vswhere -latest -find 'VC\Redist\MSVC\*\x64\*\msvcp140.dll') .
25+
Copy-Item (vswhere -latest -find 'VC\Redist\MSVC\*\x64\*\vcruntime140.dll') .
26+
Copy-Item (vswhere -latest -find 'VC\Redist\MSVC\*\x64\*\vcruntime140_1.dll') .
27+
working-directory: ./build/windows/runner/Release
28+
- name: Create artifact
29+
uses: actions/upload-artifact@v2
30+
with:
31+
name: CCExtractor Flutter GUI Windows
32+
path: |
33+
./build/windows/runner/Release/*.exe
34+
./build/windows/runner/Release/*.dll
35+
./build/windows/runner/Release/data
36+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Create release binaries for the platforms
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
build_windows:
10+
runs-on: windows-latest
11+
steps:
12+
- name: Check out repository
13+
uses: actions/[email protected]
14+
- name: Install Flutter
15+
uses: subosito/[email protected]
16+
with:
17+
flutter-version: '2.2.2'
18+
- name: Enable desktop support
19+
run: flutter config --enable-windows-desktop
20+
- name: Build Windows app
21+
run: flutter build windows
22+
- name: Copy VC redistributables
23+
run: |
24+
Copy-Item (vswhere -latest -find 'VC\Redist\MSVC\*\x64\*\msvcp140.dll') .
25+
Copy-Item (vswhere -latest -find 'VC\Redist\MSVC\*\x64\*\vcruntime140.dll') .
26+
Copy-Item (vswhere -latest -find 'VC\Redist\MSVC\*\x64\*\vcruntime140_1.dll') .
27+
working-directory: ./build/windows/runner/Release
28+
- name: Create zip
29+
uses: papeloto/action-zip@v1
30+
with:
31+
files: ./build/windows/runner/Release/
32+
dest: ./Windows.zip
33+
- name: Upload as asset
34+
uses: AButler/[email protected]
35+
with:
36+
files: './Windows.zip'
37+
repo-token: ${{ secrets.GITHUB_TOKEN }}
38+

0 commit comments

Comments
 (0)