Skip to content

Commit 1c72fa5

Browse files
Create maven-publish.yml
1 parent f7c0929 commit 1c72fa5

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2+
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
3+
4+
name: Publish package to the Maven Central Repository
5+
on:
6+
release:
7+
types: [created]
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up Maven Central Repository
14+
uses: actions/setup-java@v1
15+
with:
16+
java-version: 14
17+
server-id: ossrh
18+
server-username: MAVEN_USERNAME
19+
server-password: MAVEN_PASSWORD
20+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
21+
gpg-passphrase: MAVEN_GPG_PASSPHRASE
22+
- name: Publish package
23+
run: mvn -B deploy
24+
env:
25+
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
26+
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
27+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

0 commit comments

Comments
 (0)