Skip to content

Commit 3b7c684

Browse files
authored
github actions added
1 parent 3c381aa commit 3b7c684

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/main.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Flutter CI
2+
3+
# This workflow is triggered on pushes to the repository.
4+
5+
on:
6+
push:
7+
branches:
8+
- master
9+
10+
# on: push # Default will running for every branch.
11+
12+
jobs:
13+
build:
14+
# This job will run on ubuntu virtual machine
15+
runs-on: ubuntu-latest
16+
steps:
17+
18+
# Setup Java environment in order to build the Android app.
19+
- uses: actions/checkout@v1
20+
- uses: actions/setup-java@v1
21+
with:
22+
java-version: '12.x'
23+
24+
# Setup the flutter environment.
25+
- uses: subosito/flutter-action@v1
26+
with:
27+
channel: 'stable'
28+
# flutter-version: '1.12.x' # you can also specify exact version of flutter
29+
30+
# Get flutter dependencies.
31+
- run: flutter pub get
32+
33+
# Check for any formatting issues in the code.
34+
- run: flutter format --set-exit-if-changed .
35+
36+
# Statically analyze the Dart code for any errors.
37+
- run: flutter analyze .
38+
39+
# Run widget tests for our flutter project.
40+
- run: flutter test
41+
42+
# Build apk.
43+
- run: flutter build apk
44+
45+
# Upload generated apk to the artifacts.
46+
- uses: actions/upload-artifact@v1
47+
with:
48+
name: release-apk
49+
path: build/app/outputs/apk/release/app-release.apk

0 commit comments

Comments
 (0)