-
Notifications
You must be signed in to change notification settings - Fork 53
144 lines (136 loc) · 4.48 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
on:
push:
tags:
- '*'
name: Release Builds
jobs:
# linux:
# name: Linux
# runs-on: ubuntu-latest
# steps:
# - run: |
# git clone https://github.com/flutter/flutter.git
# cd flutter
# git checkout 72aa23eb93
# - run: echo `pwd`"/flutter/bin" >> $GITHUB_PATH
# # - run: flutter doctor
# - uses: actions/checkout@v2
# with:
# path: 'app'
# - name: Install required build tools for linux
# run: sudo apt-get update && sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev
# - run: |
# cd app
# flutter config --enable-linux-desktop
# flutter pub get
# flutter build linux --release
# cd build/linux/release
# zip -r linux-release.zip bundle
# - name: Create linux Release
# uses: ncipollo/release-action@v1
# with:
# artifacts: 'app/build/linux/release/linux-release.zip'
# token: ${{ secrets.TOKEN }}
# allowUpdates: true
web:
name: Web
runs-on: ubuntu-latest
steps:
- name: Set Up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.2'
channel: 'stable'
- run: echo `pwd`"/flutter/bin" >> $GITHUB_PATH
- uses: actions/checkout@v4
with:
path: 'app'
- run: |
cd app
flutter config --enable-web
flutter pub get
flutter build web -t lib/main.firebase.dart --release
- name: Deploy to Firebase
uses: w9jds/[email protected]
with:
args: deploy --only hosting
env:
PROJECT_PATH: 'app'
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
# android:
# name: Android
# runs-on: ubuntu-latest
# steps:
# - run: |
# git clone https://github.com/flutter/flutter.git
# cd flutter
# git checkout 72aa23eb93
# - run: echo `pwd`"/flutter/bin" >> $GITHUB_PATH
# - uses: actions/setup-java@v1
# with:
# java-version: '12.x'
# - name: Install NDK
# run: echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;20.0.5594570" --sdk_root=${ANDROID_SDK_ROOT}
# - uses: actions/checkout@v2
# with:
# path: 'app'
# - run: |
# cd app
# flutter pub get
# flutter build apk -t lib/main.firebase.dart --release
# - name: Create Android Release
# uses: ncipollo/release-action@v1
# with:
# artifacts: 'app/build/app/outputs/apk/release/app-release.apk'
# token: ${{ secrets.TOKEN }}
# allowUpdates: true
# macos:
# name: MacOS
# runs-on: macos-latest
# steps:
# - run: |
# git clone https://github.com/flutter/flutter.git
# cd flutter
# git checkout 72aa23eb93
# - run: echo `pwd`"/flutter/bin" >> $GITHUB_PATH
# - uses: actions/checkout@v2
# with:
# path: 'app'
# - run: |
# cd app
# flutter config --enable-macos-desktop
# flutter pub get
# flutter build macos -t lib/main.firebase.dart --release
# cd build/macos/Build/Products/Release
# ditto -c -k --sequesterRsrc --keepParent flutter_uis.app macos-release.zip
# - uses: ncipollo/release-action@v1
# with:
# artifacts: 'app/build/macOS/Build/Products/Release/macos-release.zip'
# token: ${{ secrets.TOKEN }}
# allowUpdates: true
# windows:
# name: Windows
# runs-on: windows-latest
# steps:
# - run: |
# git clone https://github.com/flutter/flutter.git
# cd flutter
# git checkout 72aa23eb93
# # - run: echo >> $GITHUB_PATH
# - run: echo "$(pwd)\flutter\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# - uses: actions/checkout@v2
# with:
# path: 'app'
# - run: |
# cd app
# flutter config --enable-windows-desktop
# flutter pub get
# flutter build windows --release
# cd build\windows\runner
# Compress-Archive -Path Release -DestinationPath windows-release.zip
# - name: Windows release build for github
# uses: ncipollo/release-action@v1
# with:
# artifacts: 'app\build\windows\runner\windows-release.zip'
# token: ${{ secrets.TOKEN }}
# allowUpdates: true