-
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (54 loc) · 1.75 KB
/
Copy pathpublish.yml
File metadata and controls
64 lines (54 loc) · 1.75 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Publish
on:
release:
types: [created]
workflow_dispatch:
permissions:
contents: read
jobs:
maven-central:
name: Publish reactor to Maven Central
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Java, Maven Central credentials, and GPG
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "17"
cache: maven
server-id: central
server-username: CENTRAL_USERNAME
server-password: CENTRAL_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Test, sign, and publish all modules to Maven Central
run: mvn --batch-mode --no-transfer-progress -Pcentral-publish deploy
env:
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
github-packages:
name: Publish reactor to GitHub Packages
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Java and GitHub Packages credentials
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "17"
cache: maven
server-id: github
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN
- name: Test and publish all modules to GitHub Packages
run: mvn --batch-mode --no-transfer-progress deploy
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}