-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.38 KB
/
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
name: Publish to Maven Central
# on:
# release:
# types: [created]
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
# - name: Check version
# run: |
# VERSION=$(grep 'sdkVersion =' sdk/build.gradle | sed 's/.*sdkVersion = "\(.*\)".*/\1/')
# if [ "$VERSION" != "${{ github.event.release.tag_name }}" ]; then
# echo "Version mismatch: build.gradle version is $VERSION, but release tag is ${{ github.event.release.tag_name }}"
# exit 1
# fi
- name: Publish SDK to Maven Central
run: ./gradlew :sdk:publishAndReleaseToMavenCentral
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USER_TOKEN_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_USER_TOKEN_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_IN_MEMORY_KEY }}
# ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}