-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 1.21 KB
/
maven-deploy.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
name: Maven Deploy
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types: [ published ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
# this sets the wrong variable in settings.xml needed for maven-gpg-plugin since 3.x.x
# instead you need to set passphraseEnvName in your pom.xml for now
# gpg-passphrase: OSSRH_GPG_SECRET_KEY_PASSWORD
- run: cat ~/.m2/settings.xml
# helps identify build failures due to expired keys
- run: gpg --list-secret-keys --keyid-format=long
- run: mvn -B -ntp versions:set -DnewVersion=$(./version.sh)
- run: mvn -B -ntp clean deploy
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
OSSRH_GPG_SECRET_KEY_PASSWORD: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}