95cd1ab1c0
Signed-off-by: tison <wander4096@gmail.com>
34 lines
980 B
YAML
34 lines
980 B
YAML
name: Maven Publish
|
|
|
|
on:
|
|
release:
|
|
types: [ created ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Git Repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 1.8
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: 1.8
|
|
distribution: 'zulu'
|
|
server-id: ossrh
|
|
server-username: MAVEN_USERNAME
|
|
server-password: MAVEN_PASSWORD
|
|
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
|
|
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
|
|
|
|
- name: Build with Maven
|
|
run: |
|
|
cd java
|
|
mvn clean deploy --batch-mode -DskipTests -P release -B -U -e
|
|
env:
|
|
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
|
|
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
|
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
|