-
Notifications
You must be signed in to change notification settings - Fork 38
27 lines (25 loc) · 1.04 KB
/
maven-release.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
# This workflow will put the project in our staging repo
name: Releasing Project to maven
on:
release:
types: [ published ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java & publishing credentials
uses: actions/setup-java@v1
with:
java-version: 8
server-id: sonatype-nexus-staging # Value of the distributionManagement/repository/id field of the pom.xml
server-username: SONATYPE_USERNAME # env variable for username in deploy
server-password: SONATYPE_PASSWORD # env variable for token in deploy
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Deploy to sonatype staging repo
run: mvn deploy -Ppublishing
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}