Skip to content

Commit

Permalink
Automate publish to maven to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yaphet17 committed Jun 1, 2023
1 parent b41b8c1 commit 726fbfe
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/maven-publish.yml
@@ -0,0 +1,31 @@
name: Publish package to the Maven Central Repository
on:
push:
branches:
- main
paths:
- 'docs/**'
- 'src/**'
- 'pom.xml'
workflow_dispatch:


jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish package
run: mvn --batch-mode deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

0 comments on commit 726fbfe

Please sign in to comment.