-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (35 loc) · 1.2 KB
/
publish-maven-package.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
name: Publish Maven Package
env:
MAVEN_PACKAGE_VERSION: "2.1.21"
on:
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04 ]
java-version: [ '8' ]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set Up Maven Central - JAVA ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
java-version: '${{ matrix.java-version }}'
distribution: 'temurin'
server-id: ${{ secrets.OSSRH_ID }}
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Build with Maven - JAVA ${{ matrix.java-version }}
run: mvn -B package -DskipTests=true --file pom.xml
- name: Publish To Apache Maven Central
run: mvn -B deploy -DskipTests=true --file pom.xml
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}