forked from jrpie/launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (53 loc) · 1.92 KB
/
android.yml
File metadata and controls
60 lines (53 loc) · 1.92 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
name: Android CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Read Debug Keystore
if: github.ref == 'refs/heads/master'
run: |
mkdir -p ~/.config/.android/
echo "$ANDROID_DEBUG_KEYSTORE" | base64 -d > ~/.config/.android/debug.keystore
env:
ANDROID_DEBUG_KEYSTORE: ${{ secrets.ANDROID_DEBUG_KEYSTORE }}
- name: Build with Gradle
run: ./gradlew build
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: launcher-debug-${{ github.sha }}.apk
path: app/build/outputs/apk/default/debug/app-default-debug.apk
- name: Delete Old Pre-Release
if: github.ref == 'refs/heads/master'
run: gh release delete pre-release --cleanup-tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Pre-Release
if: github.ref == 'refs/heads/master'
uses: ncipollo/release-action@v1
with:
commit: ${{ github.sha }}
tag: "pre-release"
name: "Debug (only for testing)"
prerelease: true
body: "This debug build is updated automatically whenever there is a commit to master. It is signed with a debug certificate and uses the package name `de.jrpie.android.launcher.debug`. Furthermore, the app name is set to `µLauncher [debug]`. **Debug builds are not suited for everyday use.**"
generateReleaseNotes: true
removeArtifacts: true
replacesArtifacts: true
artifacts: "app/build/outputs/apk/default/debug/app-default-debug.apk"
allowUpdates: true
token: ${{ secrets.GITHUB_TOKEN }}