-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (37 loc) · 1.21 KB
/
release.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
name: Release APK
on:
push:
tags:
- '*'
jobs:
Gradle:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
- name: setup jdk
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Load keystore
run: |
mkdir gradle-config && \
echo "${{ secrets.KEYSTORE_FILE_CONTENTS }}" | base64 -d > gradle-config/keystore && \
cat <<EOL > gradle-config/gradle.properties
RELEASE_STORE_FILE=$PWD/gradle-config/keystore
RELEASE_STORE_PASSWORD=${{ secrets.RELEASE_STORE_PASSWORD }}
RELEASE_KEY_ALIAS=${{ secrets.RELEASE_KEY_ALIAS }}
RELEASE_KEY_PASSWORD=${{ secrets.RELEASE_KEY_PASSWORD }}
EOL
- name: Build Release APK
run: ./gradlew assembleRelease
env:
GRADLE_USER_HOME: ./gradle-config
- name: Set current directory as a safe repository
run: git config --global --add safe.directory /github/workspace
- uses: ButterCam/setup-github-cli@master
- name: Release using github cli
run: gh release create ${GITHUB_REF##*/} ./app/build/outputs/apk/release/**.apk
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}