-
Notifications
You must be signed in to change notification settings - Fork 8
67 lines (58 loc) · 2.16 KB
/
Copy pathci.yml
File metadata and controls
67 lines (58 loc) · 2.16 KB
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
## Github Action Workflow for Continuous Integration Testing
# https://medium.com/mobile-development-group/github-actions-for-flutter-cf02923d7b5d
#
#
#
name: Flutter CI
# Github Actions will execute the workflow following the events under on key.
# This workflow is triggered on pushes to the repository.
on:
push:
branches:
- master
pull_request:
branches:
- master
# A workflow run is made up of one or more jobs.
jobs:
build:
# This job will run on ubuntu virtual machine
runs-on: ubuntu-latest
# A job contains a sequence of tasks called steps.
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
steps:
- uses: actions/checkout@v2
# Setup Java environment in order to build the Android app.
- uses: actions/setup-java@v1
with:
java-version: '12.x'
# Setup the flutter environment.
- uses: subosito/flutter-action@v1
with:
channel: 'stable' # 'beta' 'dev', 'alpha', default to: 'stable'
# Write the command to get the Flutter dependencies.
- run: flutter pub get
# Check for any formatting issues in the code.
- run: flutter format .
# Statically analyze the Dart code for any errors, but don't fail if any.
- run: flutter analyze . --preamble --no-fatal-infos --no-fatal-warnings
# Run widget tests for our flutter project.
- run: flutter test --coverage
# Parse a tag from the commit message
- id: get-tag
run: |
id=$(echo ${{github.event.head_commit.message}} | cut -d' ' -f1)
echo "::set-output name=tag::$id"
# Create a Release up on Github
if: !contains('${{ steps.get-tag.outputs.TAG }}', '+')
- uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ steps.get-tag.outputs.tag }}
release_name: Release ${{ steps.get-tag.outputs.tag }}
# body_path: CHANGELOG.md
body: |
See CHANGELOG.md
draft: false
prerelease: false