-
Notifications
You must be signed in to change notification settings - Fork 18
72 lines (72 loc) · 2.06 KB
/
release.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
name: release
on:
push:
branches-ignore: '**'
env:
NIXPKGS_ALLOW_UNFREE: 1
jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.4.0
- uses: cachix/install-nix-action@v16
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v10
with:
name: note-maps
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- run: nix shell -c make -e download lint test DEBUG=1
build-apk:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.4.0
- uses: cachix/install-nix-action@v16
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v10
with:
name: note-maps
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- run: yes | nix shell -c flutter doctor --android-licenses
- run: nix shell -c make -e download build DEBUG= FLUTTER_BUILD=apk
- uses: actions/upload-artifact@v2
with:
name: apk
path: ./out/flutter/nm_app/app/outputs/apk/release/*
build-web:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.4.0
- uses: cachix/install-nix-action@v16
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v10
with:
name: note-maps
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- run: nix shell --run "make -e download build DEBUG= FLUTTER_BUILD=web"
- uses: actions/upload-artifact@v2
with:
name: web
path: ./out/flutter/nm_app/web/
publish-to-firebase:
needs:
- test
- build-web
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/download-artifact@master
with:
name: web
path: ./out/firebase
- run: cd build/firebase ; rm -f web ; ln -s ../../out/firebase web
- name: Deploy to Firebase
uses: w9jds/firebase-action@master
with:
args: deploy --only hosting
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
PROJECT_ID: note-maps
PROJECT_PATH: ./build/firebase/