forked from fahrez182/AxManager
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (69 loc) · 2.19 KB
/
newer_build_debug.yml
File metadata and controls
84 lines (69 loc) · 2.19 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
82
83
84
name: Build debug APK
on:
workflow_dispatch:
inputs:
app-name:
description: 'App name for the artifact'
required: false
default: 'App'
branch:
description: 'Branch to build'
required: false
default: ''
workflow_call:
inputs:
app-name:
required: false
type: string
default: 'App'
branch:
required: false
type: string
default: ''
jobs:
build:
name: Build debug APK
runs-on: ubuntu-latest
env:
APP_NAME: ${{ inputs['app-name'] || github.event.inputs['app-name'] || 'App' }}
TARGET_REF: ${{ inputs.branch || github.event.inputs.branch || github.ref }}
steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ env.TARGET_REF }}
- name: Setup JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Make gradlew executable
run: chmod +x gradlew
- name: Set up Android SDK
uses: android-actions/setup-android@v3
- name: Accept Android SDK Licenses
run: yes | sdkmanager --licenses
- name: Install CMake
run: |
# It is safer to install the version required by your project
# Or allow the Android Gradle Plugin to download it automatically.
sdkmanager "cmake;3.31.0" # 3.22.1 is a highly stable version for AGP
- name: Build debug APK
run: ./gradlew assembleDebug
env:
# Use the standard runner path for Android Home
ANDROID_HOME: /usr/local/lib/android/sdk
- name: Generate Timestamp
run: echo "current_date=$(date +'%I%M_%Y%m%d')" >> $GITHUB_ENV
- name: List APK outputs
run: |
ls -R
find . -name "*.apk" -maxdepth 6 -print
- name: Upload debug APK
uses: actions/upload-artifact@v4
with:
name: ${{ env.APP_NAME }}-debug-${{ env.current_date }}
path: manager/build/outputs/apk/debug/*.apk
if-no-files-found: error