-
Notifications
You must be signed in to change notification settings - Fork 3.8k
51 lines (49 loc) · 1.58 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
name: Publish
on:
push:
tags:
- v*
workflow_dispatch:
inputs:
tag:
description: "Tag to upload artifacts to"
required: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: |
11
17
cache: gradle
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Install NDK
id: setup-ndk
uses: nttld/setup-ndk@v1
with:
ndk-version: r27b
- name: Register NDK
run: |
echo $PATH
echo 'ndk.path=/opt/hostedtoolcache/ndk/r27b/x64' >> local.properties
- name: Write GPG Sec Ring
run: echo '${{ secrets.GPG_KEY_CONTENTS }}' | base64 -d > /tmp/secring.gpg
- name: Update gradle.properties
run: echo -e "signing.secretKeyRingFile=/tmp/secring.gpg\nsigning.keyId=${{ secrets.SIGNING_KEY_ID }}\nsigning.password=${{ secrets.SIGNING_PASSWORD }}\nmavenCentralPassword=${{ secrets.SONATYPE_NEXUS_PASSWORD }}\nmavenCentralUsername=${{ secrets.SONATYPE_NEXUS_USERNAME }}" >> gradle.properties
- name: Upload Android Archives
run: ./gradlew publish --no-daemon --no-parallel --info --stacktrace
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Release and close
run: ./gradlew closeAndReleaseRepository
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Clean secrets
if: always()
run: rm /tmp/secring.gpg