Skip to content

Commit

Permalink
Added a workflow for a maven central release.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnastasiiaSergienko committed Oct 22, 2020
1 parent 1e4d903 commit e717737
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/maven_central_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Maven Central Release

on:
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Maven Central Repository
uses: actions/setup-java@v1
with:
java-version: 11
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Import GPG Key
run:
gpg --import --batch <(echo "${{ secrets.OSSRH_GPG_SECRET_KEY }}")
- name: Publish to Central Repository
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: mvn clean -Dgpg.skip=false -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} deploy

0 comments on commit e717737

Please sign in to comment.