-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (60 loc) · 1.76 KB
/
android.yml
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
name: Android CI
on:
push:
repository_dispatch:
workflow_dispatch:
release:
types: [published]
permissions:
actions: write
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Get Time
id: time
uses: nanzm/get-time-action@master
with:
timeZone: 8
format: 'YYYYMMDDHHmmss'
- name: Setup JDK
uses: actions/setup-java@main
with:
distribution: 'zulu'
java-version: '21'
java-package: jdk
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build APK
run: ./gradlew :android:assembleRelease
- name: Upload to artifact
uses: actions/upload-artifact@v4
continue-on-error: true
with:
name: ${{ github.ref }}_${{ steps.time.outputs.time }}
path: android/build/outputs/apk/release/*.apk
# - name: Upload to release
# uses: svenstaro/upload-release-action@master
# if: github.event_name == 'release'
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: android/build/outputs/apk/release/*.apk
# asset_name: JPSyllabary
# tag: ${{ github.ref }}_${{ steps.time.outputs.time }}
# overwrite: true
# file_glob: true
- name: Remove old Releases
uses: dev-drprasad/delete-older-releases@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
keep_latest: 3
delete_tags: true
- name: Delete workflow runs
uses: GitRML/delete-workflow-runs@main
with:
retain_days: 3
keep_minimum_runs: 2