Skip to content

Commit

Permalink
add git workflow with GPG key
Browse files Browse the repository at this point in the history
  • Loading branch information
parvez3019 committed Apr 1, 2024
1 parent c302ae2 commit 7b2a2a2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Publish package to the Maven Central Repository and GitHub Packages
on:
release:
types: [created]
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
Expand All @@ -18,6 +21,11 @@ jobs:
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Import GPG Key
uses: crazy-max/ghaction-import-gpg@v1
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Publish to the Maven Central Repository
run: mvn --batch-mode deploy
env:
Expand Down

0 comments on commit 7b2a2a2

Please # to comment.