From 3960d746f47ab6e6cb9117bfe95a250e53d0475b Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Thu, 30 Apr 2026 08:28:01 -0400 Subject: [PATCH] ci: serialize publish jobs sharing the same SHA to fix race MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a tagged release lands on master, both the master-push and tag-push events trigger the publish job. The skip-on-exists check (`npm view`) runs concurrently on both, both see the version as not-yet-published, and both proceed to `npm publish`. The first wins; the second gets E403 ("cannot publish over previously published versions") and reds out the run. Fixes the race by adding a publish-${{ github.sha }} concurrency group so the second run queues until the first finishes — by then npm view sees the published version and the skip path takes over cleanly. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a5a4c6..d1003a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,9 @@ jobs: needs: test runs-on: ubuntu-latest if: (github.ref == 'refs/heads/master' && github.event_name == 'push') || startsWith(github.ref, 'refs/tags/') + concurrency: + group: publish-${{ github.sha }} + cancel-in-progress: false permissions: id-token: write steps: