Skip to content

Commit e2b3598

Browse files
ci(core): configure ci/cd
1 parent 308ba6e commit e2b3598

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

.github/workflows/CI-CD.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: CI/CD
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
prepare:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: true
13+
matrix:
14+
node-version: [16.16.0]
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
20+
- name: cache node_modules
21+
id: cache-node-modules
22+
uses: actions/cache@v2
23+
with:
24+
path: '**/node_modules'
25+
key: ${{ runner.os }}-build-node-modules-cache-${{ hashFiles('package-lock.json') }}
26+
27+
- name: Use Node ${{ matrix.node-version }}
28+
uses: actions/setup-node@v1
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
32+
- run: git fetch --no-tags --prune --depth=5 origin main
33+
34+
- name: Install deps
35+
if: steps.cache-node-modules.cache-hit != 'true'
36+
run: npm install
37+
38+
- name: Install Flutter
39+
uses: subosito/flutter-action@v2
40+
with:
41+
channel: 'stable'
42+
cache-key: ${{ runner.os }}-flutter
43+
architecture: x64
44+
- run: flutter --version
45+
46+
build_appbundle:
47+
name: Build flutter appbundle (Android)
48+
needs: prepare
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v3
52+
with:
53+
fetch-depth: 0
54+
55+
- name: cache node_modules
56+
uses: actions/cache@v2
57+
with:
58+
path: '**/node_modules'
59+
key: ${{ runner.os }}-build-node-modules-cache-${{ hashFiles('package-lock.json') }}
60+
61+
- name: Cache Flutter dependencies
62+
uses: actions/cache@v2
63+
with:
64+
path: /opt/hostedtoolcache/flutter
65+
key: ${{ runner.os }}-flutter
66+
- uses: subosito/flutter-action@v2
67+
with:
68+
channel: 'stable'
69+
- name: Flutter analyze
70+
run: npx nx run flutter-suflex:build-appbundle
71+
- name: Upload appbundle
72+
uses: actions/upload-artifact@v3
73+
with:
74+
name: appbundle
75+
path: apps/flutter/suflex/build\app\outputs\bundle\release\app-release.aab

0 commit comments

Comments
 (0)