-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 1.18 KB
/
publish-android.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
name: "[android] Publish Nativebrik SDK"
on:
workflow_dispatch:
push:
tags:
- 'android.v*.*.*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup jdk
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- name: make archive
uses: eskatos/gradle-command-action@v1
working-directory: android
run: |
./gradlew makeArchive
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_SIGNING_KEY_PASSPHRASE: ${{ secrets.GPG_SIGNING_KEY_PASSPHRASE }}
- name: publish to maven central
working-directory: android
run: |
ls nativebrik/build/distributions
curl --request POST \
--header "Authorization: Bearer $(echo "$SONATYPE_USERNAME:$SONATYPE_PASSWORD" | base64)" \
--form bundle="@nativebrik/build/distributions/$(ls nativebrik/build/distributions)" \
'https://central.sonatype.com/api/v1/publisher/upload?publishingType=AUTOMATIC'
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}