From 50c4127428314c20b0d2c47faf8caf76afdfd903 Mon Sep 17 00:00:00 2001 From: arjunjain Date: Wed, 26 Aug 2026 20:25:43 +0530 Subject: [PATCH] ci: serialize publishes with a concurrency group GitHub delivered the v0.2.0 tag push twice in newsdata-java-sdk, so two publish runs raced and Sonatype rejected the loser: "Component with coordinate io.newsdata:newsdataapi:0.2.0 is currently being published in another deployment". The artifact published fine, but the run showed red. A concurrency group queues the duplicate instead of racing it. cancel-in-progress stays false so an in-flight upload is never killed part-way. --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2396791..ef1bb2b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,13 @@ on: - 'v[0-9]+.[0-9]+.[0-9]+' - '[0-9]+.[0-9]+.[0-9]+' +# One publish per ref at a time. GitHub can deliver a tag push more than once; +# without this, two runs race and the registry rejects the loser as a duplicate +# coordinate (seen on the v0.2.0 Maven Central release). +concurrency: + group: publish-${{ github.ref }} + cancel-in-progress: false + permissions: contents: write