-
Notifications
You must be signed in to change notification settings - Fork 834
Expand file tree
/
Copy pathmaven_central_snapshot_version.yml
More file actions
30 lines (27 loc) · 1.07 KB
/
maven_central_snapshot_version.yml
File metadata and controls
30 lines (27 loc) · 1.07 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
# This workflow deploy the snapshot packages to Maven Central
name: Build and ship SNAPSHOT versions to Maven Central
on:
push:
branches: [ main ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Maven Central Repository
uses: actions/setup-java@v1
with:
java-version: 11
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Display settings.xml
run: cat /home/runner/.m2/settings.xml
- name: Publish package
run: mvn --batch-mode -Prelease-sign-artifacts clean deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}