-
Notifications
You must be signed in to change notification settings - Fork 14
52 lines (41 loc) · 1.3 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
40
41
42
43
44
45
46
47
48
49
50
51
52
name: create-release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
env:
OUTPUT_PATH: 'app/build/outputs/apk/release'
steps:
- uses: actions/checkout@v2
- name: set up jdk
uses: actions/setup-java@v1
with:
java-version: 1.11
- name: decode keystore
uses: italankin/android-keystore-decode-action@v1
with:
output_dir: 'app/keystore-release/'
keystore_name: 'release.keystore'
properties_name: 'release.properties'
encoded_keystore: ${{ secrets.KEYSTORE_BASE64 }}
keystore_password: ${{ secrets.KEYSTORE_PASSWORD }}
key_alias: ${{ secrets.KEYSTORE_ALIAS }}
key_alias_password: ${{ secrets.KEYSTORE_ALIAS_PASSWORD }}
- name: make gradlew executable
run: chmod +x gradlew
- name: assemble
run: ./gradlew assembleRelease
- name: get current tag
id: current_tag
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: rename apk
run: mv "$OUTPUT_PATH/app-release.apk" "$OUTPUT_PATH/15-puzzle-${{ steps.current_tag.outputs.tag }}.apk"
- name: create release
uses: ncipollo/release-action@v1
with:
artifacts: "${{ env.OUTPUT_PATH }}/*.apk"
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}