Skip to content

Releasing Project to maven #53

Releasing Project to maven

Releasing Project to maven #53

Workflow file for this run

# This workflow will put the project in our staging repo
name: Releasing Project to maven
on:
release:
types: [ published ]
jobs:
build:
if: endsWith(github.ref, '-lib')
env:
AWS_DEFAULT_REGION: us-east-1
AWS_REGION: us-east-1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java & publishing credentials
uses: actions/setup-java@v1
with:
java-version: 17
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 }}