Merge pull request #134 from Kobee1203/dependabot/maven/org.apache.ma… #115
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deployment | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
build: | |
if: "!contains(toJSON(github.event.commits.*.message), '[skip ci]')" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Import GPG Key | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
- name: List keys | |
run: gpg -K | |
- name: 'Checkout repository on branch: ${{ github.REF }}' | |
uses: actions/checkout@v4 | |
env: | |
GIT_TRACE: 1 | |
GIT_CURL_VERBOSE: 1 | |
with: | |
ref: ${{ github.REF }} | |
- name: Set up JDK 11 and Maven Central Repository configuration | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 11 | |
server-id: ossrh | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
- name: Maven Version | |
run: mvn --version | |
- name: Build and Deploy to the Maven Central Repository | |
run: mvn -B -U clean deploy -DskipTests -P ossrh | |
env: | |
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} |