Skip to content
Merged
Show file tree
Hide file tree
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
55 changes: 55 additions & 0 deletions .github/workflows/ci-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI & Publish

on:
push:
branches: [ master ]
tags: [ 'v*' ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 25 (Azul Zulu)
if: "!startsWith(github.ref, 'refs/tags/v')"
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: '25'
cache: maven

- name: Set up JDK 25 (Azul Zulu) for Maven Central
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: '25'
cache: maven
server-id: central
server-username: CENTRAL_USERNAME
server-password: CENTRAL_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE

- name: Set release version from tag
if: startsWith(github.ref, 'refs/tags/v')
run: |
VERSION=${GITHUB_REF_NAME#v}
echo "Publishing version: $VERSION"
mvn versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false

- name: Build and test
run: mvn verify

- name: Publish to Maven Central
if: startsWith(github.ref, 'refs/tags/v')
run: mvn deploy -Prelease -DskipTests
env:
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
200 changes: 0 additions & 200 deletions build.xml

This file was deleted.

Loading
Loading