-
Notifications
You must be signed in to change notification settings - Fork 11
48 lines (38 loc) · 1.1 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
name: Android CI
on:
push:
branches: [ master ]
paths:
- '**/WorkflowsTrigger.kt'
env:
TZ: Asia/Shanghai
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: set up jdk 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "oracle"
cache: gradle
- name: grant execute permission for gradlew
run: chmod +x gradlew
- name: build apk with gradle
run: ./gradlew app:assembleRelease
- name: get current time
id: currentTime
run: echo "time=$(date +'%Y.%m.%d')" >> $GITHUB_OUTPUT
- name: create a release
uses: ncipollo/release-action@v1
with:
artifacts: "app/build/outputs/apk/release/*.apk"
body: "create by workflows"
allowUpdates: true
artifactErrorsFailBuild: true
generateReleaseNotes: false
token: ${{ secrets.ACTION_TOKEN }}
name: v${{ steps.currentTime.outputs.time }}
tag: ${{ steps.currentTime.outputs.time }}