Skip to content

Commit

Permalink
Trying a new action to deploy to maven central
Browse files Browse the repository at this point in the history
  • Loading branch information
joshsteeleAPL committed Aug 27, 2024
1 parent 565086d commit 4ec97d4
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/maven-central-deploy-on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish package to the Maven Central Repository
on:
release:
types: [created]

jobs:
publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
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: Publish package
run: mvn --batch-mode clearn deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

0 comments on commit 4ec97d4

Please sign in to comment.