-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (44 loc) · 1.32 KB
/
release-android.yml
File metadata and controls
55 lines (44 loc) · 1.32 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
name: Release Android
on:
workflow_dispatch:
permissions:
contents: write
jobs:
build-android:
name: Build Android APK
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Install dependencies
run: flutter pub get
- name: Build release APK
run: flutter build apk --release
- name: Prepare APK artifact
shell: bash
run: |
mkdir -p release-assets
cp build/app/outputs/flutter-apk/app-release.apk release-assets/AndroidIRCx-Flutter-android.apk
- name: Upload workflow artifact
uses: actions/upload-artifact@v4
with:
name: android-release-apk
path: release-assets/AndroidIRCx-Flutter-android.apk
- name: Attach APK to GitHub release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
files: release-assets/AndroidIRCx-Flutter-android.apk