Releasing Project to maven #53
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 }} |