-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (35 loc) · 1.04 KB
/
maven.yml
File metadata and controls
43 lines (35 loc) · 1.04 KB
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
name: Publish to Maven Central on VERSION change
on:
push:
branches:
- master
paths:
- 'VERSION'
jobs:
publish:
name: Publish to Maven Central
runs-on: ubuntu-latest
permissions:
contents: read
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Java & Maven for Central
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
cache: maven
# for central-publishing-maven-plugin
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
# import the private key only
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish to Maven Central
run: mvn -B clean deploy --no-transfer-progress