-
Notifications
You must be signed in to change notification settings - Fork 14
50 lines (41 loc) · 1.15 KB
/
build.yml
File metadata and controls
50 lines (41 loc) · 1.15 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
# Note: In a yml each level is padded by 2 spaces
name: Flutter
on:
# Runs this action when you push on master
workflow_dispatch:
push:
branches: [ "main" ]
tags:
- "v*.*.*"
# Runs this when a PR against master is created
pull_request:
branches: [ "main" ]
permissions:
contents: write
jobs:
flutter_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.19.6'
- name: Install dependencies
run: flutter pub get
- uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: '17'
- name: Build apk
run: flutter build apk --release --no-shrink
- uses: actions/upload-artifact@v4
with:
name: release-apk-artifact
path: build/app/outputs/apk/release/app-release.apk
- name: Release apk
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/app/outputs/apk/release/app-release.apk