-
Notifications
You must be signed in to change notification settings - Fork 144
66 lines (60 loc) · 2 KB
/
dev_build.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
name: Dev Build
# https://maxim-saplin.github.io/data_table_2/dev/#/datatable2
on:
push:
branches: [main]
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: gradle
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
architecture: x64
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:'
- name: Flutter Doctor
run: flutter doctor
working-directory: ./
- name: Upgrades flutter
run: flutter upgrade
working-directory: ./
- name: Enable Web
run: flutter config --enable-web
working-directory: ./example
- name: Install dependencies
run: flutter packages get
working-directory: ./
- name: Analyze
run: flutter analyze
- name: Run tests
run: flutter test --coverage
# - name: Upload coverage to codecov
# run: curl -s https://codecov.io/bash
# shell: bash
- uses: codecov/codecov-action@v3
with:
#token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
#files: ./coverage1.xml,./coverage2.xml # optional
#flags: unittests # optional
#name: codecov-umbrella # optional
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)
- name: Build Web
run: flutter build web
working-directory: ./example
- name: Fix PWA
run: sed -i'.js' -e 's+"/"+""+g' flutter_service_worker.js #https://github.com/flutter/flutter/issues/68449
working-directory: ./example/build/web
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
target-folder: /dev # root folder is stable example build, /dev is the current main build
folder: ./example/build/web