-
Notifications
You must be signed in to change notification settings - Fork 5
40 lines (36 loc) · 1.25 KB
/
deploy.yml
File metadata and controls
40 lines (36 loc) · 1.25 KB
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
name: Deploy build
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Install NDK
run: echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;20.0.5594570" --sdk_root=${ANDROID_SDK_ROOT}
- name: Unzip Release Key
run: echo "${{ secrets.SIGNING_KEY }}" | base64 -d > deploy.jks
- name: Build with Gradle
run: chmod a+x ./gradlew && ./gradlew assembleRelease
env:
KEY_ALIAS_RELEASE: ${{ secrets.KEY_ALIAS }}
KEY_PASS_RELEASE: ${{ secrets.SIGNING_KEY_PASS }}
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Rename APK
run: |
mv ./app/build/outputs/apk/release/app-release.apk ./remo-controller-for-android-${{ steps.get_version.outputs.VERSION }}.apk
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: remo-controller-for-android-${{ steps.get_version.outputs.VERSION }}.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}