-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (107 loc) · 3.64 KB
/
flutter-desktop-deployment.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Flutter Desktop Deployment
on:
pull_request_target:
types:
- closed
# Normal push commit
# on: push
# Push to specifc branch/branches
# push:
# branches:
# - main
jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- run: |
echo The PR was merged
linux:
name: Linux build and release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- name: Install os dependencies
run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev
- name: Install project dependencies
run: flutter pub get
#- name: Generate intermediates
# run: flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Enable linux build
run: flutter config --enable-linux-desktop
- name: Build artifacts
run: flutter build linux --release
- name: Package Release files
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: github_client-${{github.head_ref}}-linux.zip
directory: build/linux/x64/release/bundle
- name: Release to github
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{github.head_ref}}
files: build/linux/x64/release/bundle/github_client-${{github.head_ref}}-linux.zip
windows:
name: Windows build and release
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- name: Install project dependencies
run: flutter pub get
#- name: Generate intermediates
# run: flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Enable windows build
run: flutter config --enable-windows-desktop
- name: Build artifacts
run: flutter build windows --release
- name: Package Release
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: github_client-${{github.head_ref}}-windows.zip
directory: build/windows/runner/Release
- name: Release to github
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{github.head_ref}}
files: build/windows/runner/Release/github_client-${{github.head_ref}}-windows.zip
macos:
name: MacOS build and release
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- name: Install project dependencies
run: flutter pub get
#- name: Generate intermediates
# run: flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Enable macOS build
run: flutter config --enable-macos-desktop
- name: Build artifacts
run: flutter build macos --release
- name: Package Release
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: github_client-${{github.head_ref}}-macos.zip
directory: build/macos/Build/Products/Release
- name: Release to github
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{github.head_ref}}
files: build/macos/Build/Products/Release/github_client-${{github.head_ref}}-macos.zip