Skip to content

Commit

Permalink
Create .github/workflows/maven-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanCapistrano authored Feb 27, 2023
1 parent 8976a92 commit fbea3f0
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish to Maven Repository

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'

- name: Build settings.xml file
uses: whelk-io/maven-settings-xml-action@v20
with:
servers: >
[
{
"id": "ossrh",
"username": "${{secrets.MVN_USERNAME}}",
"password": "${{secrets.MVN_PASSWORD}}"
}
]
- name: Deploy to Maven Repository
env:
GPG_KEYNAME: ${{ secrets.GPG_PRIV_KEY }}
run: mvn clean deploy --no-transfer-progress

0 comments on commit fbea3f0

Please sign in to comment.