-
Notifications
You must be signed in to change notification settings - Fork 54
67 lines (57 loc) · 1.57 KB
/
android_debug.yml
File metadata and controls
67 lines (57 loc) · 1.57 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
name: Android Debug CI
on:
push:
branches:
- dev
paths-ignore:
# 构建无关文件不触发
- '**.md'
- '**.json'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
submodules: true
- name: Delete Debug
uses: dev-drprasad/delete-tag-and-release@v0.2.1
with:
delete_release: true
tag_name: Debug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Set Cache
uses: actions/cache@v3
with:
path: |
build
app/build
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle*', 'gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build with Gradle
run: ./gradlew assembleDebug
- name: Upload Debug Artifact
uses: actions/upload-artifact@v3
with:
name: "auto_built_snapshot_${{ github.sha }}"
path: app/build/outputs/apk/Github/debug/app_debug.apk
retention-days: 10
- name: Upload Pre-Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
generate_release_notes: true
name: 'Debug'
tag_name: 'Debug'
target_commitish: ${{ github.sha }}
files: 'app/build/outputs/apk/Github/debug/*.apk'