-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (44 loc) · 1.3 KB
/
maven-publish.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
36
37
38
39
40
41
42
43
44
45
name: Publish a new Release
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents:
write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: "main"
- name: Update PRP Files
uses: CIFriends/prp-preprocessor@v1
with:
ignoredDirs: |
docs
src
target
env:
currentVersion: ${{ github.event.release.tag_name }}
- uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
java-package: 'jdk'
cache: 'maven'
server-id: ossrh
- name: mvn versions
run: mvn versions:set -DnewVersion=${{ github.event.release.tag_name }}
- name: Import GPG Key
uses: crazy-max/[email protected]
with:
gpg_private_key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
passphrase: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
- name: Release With Maven
run: |
mvn -s settings.xml -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} --batch-mode deploy -DskipTests -P publish
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}