Skip to content

Commit

Permalink
Merge pull request #30 from oncloudit/main
Browse files Browse the repository at this point in the history
add Github Action
  • Loading branch information
zhangyelong authored Mar 2, 2023
2 parents 4da81cc + 10a8818 commit ed8aea7
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Maven Central Repo Deployment
on:
release:
types: [released]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'adopt'
shell: bash -l {0}
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase : GPG_PASSPHRASE
- run: |
export GPG_TTY=$(tty)
gpg --pinentry-mode loopback --passphrase '${{ secrets.GPG_PASSPHRASE }}' -s pom.xml
mvn --batch-mode deploy -Dmaven.test.skip=true
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

0 comments on commit ed8aea7

Please sign in to comment.