-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (87 loc) · 3.08 KB
/
main.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
analyze:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: subosito/[email protected]
- name: flutter analyze
run: flutter analyze
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/[email protected]
- name: flutter format
run: flutter format --set-exit-if-changed .
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/[email protected]
- run: flutter config --enable-windows-desktop
- name: flutter build windows
run: flutter build windows
- run: |
copy C:\Windows\System32\msvcp140.dll build\windows\runner\Release\
copy C:\Windows\System32\vcruntime140.dll build\windows\runner\Release\
copy C:\Windows\System32\vcruntime140_1.dll build\windows\runner\Release\
copy LICENSE build\windows\runner\Release\
- name: Upload Windows Build Artifact
uses: actions/[email protected]
with:
name: windows_build
path: build/windows/runner/Release/
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/[email protected]
- run: sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev
- run: flutter config --enable-linux-desktop
- name: flutter build linux
run: flutter build linux
- run: cp LICENSE build/linux/x64/release/bundle
- name: Upload Linux Build Artifact
uses: actions/[email protected]
with:
name: linux_build
path: build/linux/x64/release/bundle
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/[email protected]
- run: flutter config --enable-macos-desktop
# - run: flutter create . --project-name=xaif --platforms=macos
- name: flutter build macos --release
run: flutter build macos --release
- run: cp LICENSE build/macos/Build/Products/Release
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: macos_build
path: build/macos/Build/Products/Release
build-web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/[email protected]
- name: flutter build web
run: flutter build web
- run: cp LICENSE build/web
- name: Upload web Build Artifact
uses: actions/[email protected]
with:
name: web_build
path: build/web