-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (38 loc) · 1.58 KB
/
aar-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
name: Build and publish AAR to Maven Central
on:
push:
tags:
- 'v*.*.*'
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 11
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Execute Gradle build
run: ./android/gradlew -p ./android :ramses-aar:build
- name: Decode GPG key
run: |
mkdir -p .$HOME/.gradle
echo "${{secrets.OSSRH_GPG_SECRET_KEY}}" > $HOME/.gradle/secring.gpg.b64
base64 -d $HOME/.gradle/secring.gpg.b64 > $HOME/.gradle/secring.gpg
- name: Set release version tag
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Publish Library
run: |
echo "Publishing aar package for version '${{ env.RELEASE_VERSION }}'..."
./android/gradlew -p ./android :ramses-aar:publish -PramsesReleaseTag=${{ env.RELEASE_VERSION }} -Psigning.keyId=${{secrets.SIGNING_KEY_ID}} -Psigning.password=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} -Psigning.secretKeyRingFile=$HOME/.gradle/secring.gpg --no-daemon --no-parallel
echo "Releasing aar package..."
./android/gradlew -p ./android closeAndReleaseRepository
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.OSSRH_PASSWORD }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}