From f1d7d0f24522199944f803914dc899ad0f111224 Mon Sep 17 00:00:00 2001 From: zihluwang Date: Mon, 5 May 2025 10:39:17 +0800 Subject: [PATCH 1/2] refactor: migrate to Central Publisher Portal --- .github/workflows/github-packages-publish.yml | 8 ++++++++ gradle.properties | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-packages-publish.yml b/.github/workflows/github-packages-publish.yml index 1032b73..fcc1294 100644 --- a/.github/workflows/github-packages-publish.yml +++ b/.github/workflows/github-packages-publish.yml @@ -69,3 +69,11 @@ jobs: - name: Publish to Maven Central run: ./gradlew publish + + - name: Create Deployment on Central Publisher Portal + run: | + curl -X 'POST' \ + 'https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/com.onixbyte?publishing_type=user_managed' \ + -H 'accept: */*' \ + -H 'Authorization: Bearer ${{ secrets.MAVEN_PORTAL_TOKEN }}' \ + -d '' diff --git a/gradle.properties b/gradle.properties index ac0191f..afc190a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,7 +15,7 @@ # limitations under the License. # -artefactVersion=2.1.0 +artefactVersion=2.1.2 projectUrl=https://onixbyte.com/JDevKit projectGithubUrl=https://github.com/OnixByte/JDevKit licenseName=The Apache License, Version 2.0 From fe9b47fc1fd3bdc887266c80a69a48a447671daa Mon Sep 17 00:00:00 2001 From: Zihlu Wang Date: Mon, 5 May 2025 13:53:51 +0800 Subject: [PATCH 2/2] fix: added `--fail` flag to prevent non-success HTTP responses cause the step to fail Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/github-packages-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-packages-publish.yml b/.github/workflows/github-packages-publish.yml index fcc1294..4d32dd7 100644 --- a/.github/workflows/github-packages-publish.yml +++ b/.github/workflows/github-packages-publish.yml @@ -72,7 +72,7 @@ jobs: - name: Create Deployment on Central Publisher Portal run: | - curl -X 'POST' \ + curl --fail -X 'POST' \ 'https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/com.onixbyte?publishing_type=user_managed' \ -H 'accept: */*' \ -H 'Authorization: Bearer ${{ secrets.MAVEN_PORTAL_TOKEN }}' \