-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (30 loc) · 1016 Bytes
/
build.yaml
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
name: Build
on:
push:
branches: [main, "*.x"]
jobs:
build:
runs-on: ubuntu-latest
env:
MAVEN_ARGS: --batch-mode --color=always --no-transfer-progress --settings=.github/settings.xml
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GIT_ACTION_TOKEN }}
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
cache: maven
server-id: sonatype-nexus
server-username: SERVER_USERNAME
server-password: SERVER_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- run: mvn $MAVEN_ARGS dependency:go-offline
- run: mvn $MAVEN_ARGS deploy
env:
SERVER_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
SERVER_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
GIT_ACTION_TOKEN: ${{ secrets.GIT_ACTION_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}