-
Notifications
You must be signed in to change notification settings - Fork 10
61 lines (50 loc) · 1.5 KB
/
maven.yml
File metadata and controls
61 lines (50 loc) · 1.5 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
name: Maven Build and Deployment
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build and Verify
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v5
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y zstd
- name: Set up Java and Maven
uses: actions/setup-java@v5
with:
distribution: zulu
java-version: 25
cache: maven
- name: Build with Maven
run: mvn -B verify
deploy:
name: Deploy to Central Portal
needs: [build]
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v5
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y zstd
- name: Set up Java and Maven
uses: actions/setup-java@v5
with:
distribution: zulu
java-version: 25
cache: maven
server-id: central
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_PASSWORD
gpg-private-key: ${{ secrets.gpg_private_key }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish Maven package
run: mvn -B -Pcentral-deploy deploy -DskipTests
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.gpg_passphrase }}
MAVEN_CENTRAL_USERNAME: ${{ secrets.central_username }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.central_password }}