-
Notifications
You must be signed in to change notification settings - Fork 6
76 lines (74 loc) · 2.5 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
74
75
76
name: Android CI
on:
push:
branches: [ master ]
paths-ignore:
- '.github/**'
- '.idea/**'
- 'README.md'
- 'LICENSE'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: build
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Cache Gradle
uses: actions/[email protected]
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Time tick
run: echo "time_tick=$(date '+%Y%m%d%H%M')" >> $GITHUB_ENV
- name: Signing Apk
run: |
echo '${{ secrets.ANDROID_JKS }}'|base64 -d > android.jks
echo 'storeFile=../android.jks' >> local.properties
echo 'storePassword=${{ secrets.STORE_PASSWORD }}' >> local.properties
echo 'keyAlias=${{ secrets.KEY_ALIAS }}' >> local.properties
echo 'keyPassword=${{ secrets.KEY_PASSWORD }}' >> local.properties
echo 'buildTime=${{ env.time_tick }}' >> local.properties
- name: Update summary.json
run: ./gradlew summary
- name: Build with Gradle
run: ./gradlew publish
- name: Move Apk
run: |
cd ${{ github.workspace }}/app/build/outputs/apk
mv konachan/release/* konachan/
rm -fr konachan/release
mv yande/release/* yande/
rm -fr yande/release
- name: Artifact Apk
uses: actions/upload-artifact@v3
with:
name: outputs
path: ${{ github.workspace }}/app/build/outputs/**
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ env.time_tick }}
name: pre-release ${{ env.time_tick }}
body: |
- ${{ github.ref }}
- ${{ github.sha }}
draft: false
prerelease: true
files: |
${{ github.workspace }}/app/build/outputs/apk/konachan/app-konachan-release.apk
${{ github.workspace }}/app/build/outputs/apk/yande/app-yande-release.apk