-
-
Notifications
You must be signed in to change notification settings - Fork 72
31 lines (31 loc) · 1.07 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
name: Publish to Maven Central
on:
push:
branches:
- develop
# pull_request: # uncommit for debug
# types: [ opened, synchronize, reopened ]
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
cache: gradle
- name: Publish Package
env:
GITHUB_USERNAME: GITHUB_ACTOR
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_USER_PASSWORD: ${{ secrets.MAVEN_USER_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
run: ./gradlew --no-daemon --info --stacktrace publish publishToSonatype closeAndReleaseSonatypeStagingRepository
if: env.MAVEN_USERNAME != ''