-
Notifications
You must be signed in to change notification settings - Fork 9
50 lines (48 loc) · 1.66 KB
/
master_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
40
41
42
43
44
45
46
47
48
49
50
name: Build & Upload Release APK
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.4.2
- name: Setup JDK 1.11
uses: actions/setup-java@v3.4.1
with:
distribution: 'corretto'
java-version: '11'
- name: Make Gradle Executable
run: chmod +x ./gradlew
- name: Build Signed APK
uses: victorbnl/build-signed-apk@main
with:
keystore_b64: ${{ secrets.keystore }}
keystore_password: ${{ secrets.keystore_password }}
key_alias: ${{ secrets.key_alias }}
key_password: ${{ secrets.key_password }}
- name : Retrieve App Version
run: echo "::set-output name=VERSION_NAME::$(${{github.workspace}}/gradlew -q printVersionName)"
id: android_version
- name: Integrate App Version With Github Environment
run: echo "version_name=${{steps.android_version.outputs.VERSION_NAME}}" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.version_name }}
release_name: ${{ github.event.repository.name }} v${{ env.version_name }}
- name: Upload Release
id: upload_release_asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: app/build/outputs/apk/release/app-release.apk
asset_name: ${{ github.event.repository.name }}.apk
asset_content_type: application/zip