From 8d005d1a21fa275a5338cc24e65a0d75c575a1cd Mon Sep 17 00:00:00 2001 From: boronine-bot Date: Sat, 1 Aug 2026 05:12:28 +0000 Subject: [PATCH 1/4] Migrate from OSSRH to Central Publishing Maven Plugin - Replace nexus-staging-maven-plugin with central-publishing-maven-plugin 0.11.0 - Remove distributionManagement (no longer needed) - Update README deployment instructions for new Central Publishing flow - Use Portal token authentication instead of legacy OSSRH credentials --- README.md | 28 +++++++++++----------------- pom.xml | 20 ++++++-------------- 2 files changed, 17 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 03f6cce..a1d11f4 100644 --- a/README.md +++ b/README.md @@ -73,31 +73,25 @@ var color = android.graphics.Color.rgb(r, g, b); Docs: -- https://central.sonatype.org/publish/publish-maven/ +- https://central.sonatype.org/publish/publish-portal-maven/ - https://central.sonatype.org/publish/requirements/gpg/ +- https://central.sonatype.org/publish/generate-portal-token/ -Set `~/m2/settings.xml`: +Generate a Portal token at https://central.sonatype.com, then set `~/.m2/settings.xml`: ```xml - ossrh - hsluv - REDACTEDREDACTEDREDACTED + central + + + + + EBFD22439E5C59D664D0CFC750617B51F61187C2 + - - - ossrh - - true - - - REDACTEDREDACTEDREDACTED - - - ``` @@ -105,5 +99,5 @@ Then run: ```bash mvn versions:set -DnewVersion=0.3 # bump version -mvn clean deploy -P release +mvn clean deploy ``` diff --git a/pom.xml b/pom.xml index f1c00da..b45ae17 100644 --- a/pom.xml +++ b/pom.xml @@ -57,25 +57,17 @@ - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 + org.sonatype.central + central-publishing-maven-plugin + 0.11.0 true - ossrh - https://oss.sonatype.org/ - true + central + true + published From c6c6f3453c65ea07fbba090d19ce30d4f3ef3752 Mon Sep 17 00:00:00 2001 From: boronine-bot Date: Sun, 16 Aug 2026 15:16:42 +0000 Subject: [PATCH 2/4] Bump version to 1.0.1 --- README.md | 4 ++-- pom.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a1d11f4..67d8305 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ If you are using Maven, add the following to your `pom.xml` file: org.hsluv hsluv - 1.0 + 1.0.1 # Usage @@ -98,6 +98,6 @@ Generate a Portal token at https://central.sonatype.com, then set `~/.m2/setting Then run: ```bash -mvn versions:set -DnewVersion=0.3 # bump version +mvn versions:set -DnewVersion=1.0.1 # bump version mvn clean deploy ``` diff --git a/pom.xml b/pom.xml index b45ae17..d89258c 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.hsluv hsluv jar - 1.0 + 1.0.1 hsluv Human-friendly HSL From cd2672c6433c0f8b27545c95bfddeac49a91e70c Mon Sep 17 00:00:00 2001 From: boronine-bot Date: Sun, 16 Aug 2026 15:17:39 +0000 Subject: [PATCH 3/4] Add GitHub Actions release workflow for Maven Central --- .github/workflows/release.yml | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..31fa943 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,51 @@ +name: Release to Maven Central + +on: + push: + tags: + - 'v*' + workflow_dispatch: + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 8 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '8' + + - name: Import GPG key + env: + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + run: | + echo "$GPG_PRIVATE_KEY" | gpg --batch --import + + - name: Configure Maven settings + env: + CENTRAL_TOKEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }} + CENTRAL_TOKEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + run: | + mkdir -p ~/.m2 + cat > ~/.m2/settings.xml < + + + central + ${CENTRAL_TOKEN_USERNAME} + ${CENTRAL_TOKEN_PASSWORD} + + + EBFD22439E5C59D664D0CFC750617B51F61187C2 + ${GPG_PASSPHRASE} + + + + EOF + + - name: Publish to Maven Central + run: mvn --batch-mode clean deploy From a1138cdaab6eb4620675702932ac79306da34c33 Mon Sep 17 00:00:00 2001 From: boronine-bot Date: Sun, 16 Aug 2026 18:37:54 +0000 Subject: [PATCH 4/4] Rotate to fresh RSA 4096 signing key --- .github/workflows/release.yml | 2 +- README.md | 2 +- pom.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 31fa943..62ac400 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: ${CENTRAL_TOKEN_PASSWORD} - EBFD22439E5C59D664D0CFC750617B51F61187C2 + D7771F55ED62AAC7162CFDE833B20E4440CDF36D ${GPG_PASSPHRASE} diff --git a/README.md b/README.md index 67d8305..2b47af2 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ Generate a Portal token at https://central.sonatype.com, then set `~/.m2/setting - EBFD22439E5C59D664D0CFC750617B51F61187C2 + D7771F55ED62AAC7162CFDE833B20E4440CDF36D diff --git a/pom.xml b/pom.xml index d89258c..9e10e2a 100644 --- a/pom.xml +++ b/pom.xml @@ -108,8 +108,8 @@ sign - EBFD22439E5C59D664D0CFC750617B51F61187C2 - EBFD22439E5C59D664D0CFC750617B51F61187C2 + D7771F55ED62AAC7162CFDE833B20E4440CDF36D + D7771F55ED62AAC7162CFDE833B20E4440CDF36D --pinentry-mode loopback