Skip to content

Commit 7bcf1cd

Browse files
authored
Add CI configuration for Android package
1 parent e8b7f0c commit 7bcf1cd

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# This is a basic workflow to help you get started with Actions
2+
name: google_api_availability_android
3+
4+
# Controls when the action will run. Triggers the workflow on push or pull request
5+
# events but only for the main branch
6+
on:
7+
push:
8+
branches: [ main ]
9+
paths:
10+
- 'google_api_availability_android/**'
11+
pull_request:
12+
branches: [ main ]
13+
paths:
14+
- 'google_api_availability_android/**'
15+
16+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
17+
jobs:
18+
ci:
19+
name: Android platform package
20+
21+
# The type of runner that the job will run on
22+
runs-on: ubuntu-latest
23+
24+
env:
25+
source-directory: ./google_api_availability_android
26+
example-directory: ./google_api_availability_android/example
27+
28+
# Steps represent a sequence of tasks that will be executed as part of the job
29+
steps:
30+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
31+
- uses: actions/checkout@v3
32+
33+
# Make sure the stable version of Flutter is available
34+
- uses: subosito/flutter-action@v2
35+
with:
36+
channel: 'stable'
37+
38+
# Download all Flutter packages
39+
- name: Download dependencies
40+
run: flutter pub get
41+
working-directory: ${{env.source-directory}}
42+
43+
# Run Flutter Format to ensure formatting is valid
44+
- name: Run Flutter Format
45+
run: flutter format --set-exit-if-changed .
46+
working-directory: ${{env.source-directory}}
47+
48+
# Run Flutter Analyzer
49+
- name: Run Flutter Analyzer
50+
run: flutter analyze
51+
working-directory: ${{env.source-directory}}
52+
53+
# Build Android version of the example App
54+
- name: Run Android build
55+
run: flutter build apk --release
56+
working-directory: ${{env.example-directory}}
57+

0 commit comments

Comments
 (0)