-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.19 KB
/
flutter-ci.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
name: Flutter CI
on:
workflow_dispatch:
inputs:
TAG:
description: 'Set a Tag'
required: true
default: ''
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v1
with:
java-version: '17.x'
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Build apks
run: |
flutter pub get
flutter build apk --dart-define=GITHUB_HASH=$GITHUB_SHA --release
flutter build apk --dart-define=GITHUB_HASH=$GITHUB_SHA --target-platform android-arm,android-arm64,android-x64 --split-per-abi --release
mkdir -p releases
mv -f build/app/outputs/flutter-apk/*-release.apk releases
mv -f releases/app-release.apk releases/app-universal-release.apk
- name: Release to github
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "releases/*-release.apk"
tag: ${{ github.event.inputs.TAG }}