-
-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (34 loc) · 1.23 KB
/
deploy_to_maven_central.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
# Source: https://docs.github.com/en/actions/publishing-packages/publishing-java-packages-with-maven
name: Deploy to Maven Central
on:
workflow_dispatch:
jobs:
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: |
8
11
server-id: maven-central-releases
# Server authentication corresponds to "user token" returned by https://oss.sonatype.org/
server-username: OSSRH_USERNAME
server-password: OSSRH_TOKEN
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Configure Git User
run: |
git config user.email "[email protected]"
git config user.name "Gili"
- name: Deploy to Maven Central
run: ./mvnw --batch-mode -Darguments="-Ddeploy" --batch-mode -V -e release:prepare release:perform
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}