Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .github/workflows/mvn_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,26 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the code
- uses: actions/checkout@v4

# Step 2: Set up the Java environment
- uses: actions/setup-java@v4
with:
java-version: '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
server-username: ${{ secrets.MAVEN_USERNAME }}
server-password: ${{ secrets.MAVEN_PASSWORD }}
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

# Step 3: Verify if the GPG key is correctly imported
- name: Verify GPG Key
run: gpg --list-secret-keys --keyid-format LONG

- name: Build with Maven
# Step 4: Build and publish using Maven
- name: Build and Publish with Maven
run: mvn clean deploy --batch-mode -DskipTests -P release -B -U -e
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
Expand Down