-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.82 KB
/
android_publish.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
53
54
55
56
57
name: Android publish
on:
push:
tags:
- 'v*.*.*'
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Cache Gradle and wrapper
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
- name: Set up env variables
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
echo "RELEASE_ARTIFACT=simpleBleClient_release_${GITHUB_REF#refs/tags/v}.aar" >> $GITHUB_ENV
echo "DEBUG_ARTIFACT=simpleBleClient_debug_${GITHUB_REF#refs/tags/v}.aar" >> $GITHUB_ENV
echo "KEYSTORE_PATH=${{ secrets.KEYSTORE_PATH }}" >> $GITHUB_ENV
echo "KEY_ALIAS=${{ secrets.KEY_ALIAS }}" >> $GITHUB_ENV
echo "KEYSTORE_PASSWORD=${{ secrets.KEYSTORE_PASSWORD }}" >> $GITHUB_ENV
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
echo GPR_USER=${{ github.actor }} >> $GITHUB_ENV
echo GPR_KEY=${{ secrets.PUBLISH_TOKEN }} >> $GITHUB_ENV
- name: Decode Keystore
run: pwd; echo ${{ secrets.ENCODED_KEYSTORE }} | base64 -d > ${{ secrets.KEYSTORE_NAME }}
- name: Build debug / release AAR, Generate API documentation
run: ./gradlew assemble
- name: Create Github Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
prerelease: true
draft: false
files: |
simpleBleClient/build/outputs/aar/*
simpleBleClient/build/libs/*
LICENSE