-
Notifications
You must be signed in to change notification settings - Fork 57
49 lines (42 loc) · 1.21 KB
/
auto-build.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
name: "Auto Build"
on:
push:
branches:
- "main"
paths:
- "app/**"
- "build.gradle.kts"
- "gradle.properties"
- "settings.gradle.kts"
- "!**/.gitignore"
- "!app/src/*[Tt]est/**"
jobs:
build:
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Create keystore files
run: |
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -di > release.keystore
echo "${{ secrets.KEYSTORE_PROPERTIES }}" > keystore.properties
- name: Build
id: build
run: ./gradlew assembleRelease
- name: Automatic Releases
uses: marvinpinto/action-automatic-releases@latest
if: ${{ steps.build.outcome == 'success' }}
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Auto build"
files: 'app/build/outputs/apk/**/*.apk'