-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (44 loc) · 1.48 KB
/
android.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
on:
push:
branches:
- main
# This workflow is triggered on pushes to the repository.
# on: push # Default will running for every branch.
name: Android App
jobs:
build:
name: Build Apps
# This job will run on ubuntu virtual machine
runs-on: ubuntu-latest
steps:
# Setup Tagging For Sorted releases
- name: Export Release Timestamp
run: echo "APP_VERSION=v$(date +'%Y.%m.%d.%H.%M.%S')" >> $GITHUB_ENV
# Setup Java environment in order to build the app.
- name: Checkout repository
uses: actions/checkout@v1
- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: '15'
distribution: 'adopt'
# Setup the flutter environment.
- name: Set up Flutter
uses: subosito/flutter-action@v1
with:
channel: 'stable'
# flutter-version: '1.12.x' # you can also specify exact version of flutter
# Get flutter dependencies.
- name: Install pub Dependencies
run: flutter pub get
#Start building Applications
- name: Build Android App
run: flutter build apk --split-per-abi
# Upload generated file to the releases section.
- name: Release Apps
uses: ncipollo/release-action@v1
with:
tag: ${{ env.APP_VERSION }}
name: ${{ env.APP_VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: 'build/app/outputs/apk/release/*.apk'