-
Notifications
You must be signed in to change notification settings - Fork 47
35 lines (33 loc) · 1.24 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
name: Publish Android
on:
release:
types:
- created
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- 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 assembleRelease publish --info
- name: Release fbjni staging repository
run: ./gradlew closeAndReleaseRepository
- name: Upload Java-Only Archives
run: ./gradlew -b host.gradle assemble publish --info
- name: Release fbjni-java-only staging repository
run: ./gradlew closeAndReleaseRepository
- name: Clean secrets
if: always()
run: rm /tmp/secring.gpg