Repository navigation
81 lines (68 loc) · 2.05 KB
/
Copy pathbuild.yml
File metadata and controls
81 lines (68 loc) · 2.05 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Build APK
on:
push:
branches: ['**']
tags: ['v*']
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build debug & release APK
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- name: Set up Android SDK
uses: android-actions/setup-android@v4.0.4
- name: Install Android build tools
run: >-
sdkmanager
"platforms;android-37.0"
"build-tools;36.0.0"
"ndk;28.2.13676358"
"cmake;3.22.1"
- name: Set up Gradle (caching)
uses: gradle/actions/setup-gradle@v4
- name: Build APKs
run: ./gradlew assembleDebug assembleRelease --no-daemon
- name: Verify APK outputs
run: |
ls -lh app/build/outputs/apk/debug/app-debug.apk
ls -lh app/build/outputs/apk/release/app-release-unsigned.apk
- name: Upload debug APK
uses: actions/upload-artifact@v4
with:
name: ovaa-debug-apk
path: app/build/outputs/apk/debug/app-debug.apk
- name: Upload release APK (unsigned)
uses: actions/upload-artifact@v4
with:
name: ovaa-release-apk-unsigned
path: app/build/outputs/apk/release/app-release-unsigned.apk
release:
name: Publish APKs to GitHub Releases
needs: build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download APK artifacts
uses: actions/download-artifact@v4
with:
path: apks
- name: Publish GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
apks/ovaa-debug-apk/app-debug.apk
apks/ovaa-release-apk-unsigned/app-release-unsigned.apk
generate_release_notes: true