From fdd2be44b6746d2c7f064e44f329dab5beb9bd9d Mon Sep 17 00:00:00 2001 From: Matsu Date: Thu, 26 Mar 2026 14:03:18 +0200 Subject: [PATCH] ci: Use track-specific npm dist-tags on publish (#27598) Co-authored-by: Claude Sonnet 4.6 --- .github/workflows/release-publish.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 8aa586a988d..9f3eedb0922 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -78,10 +78,16 @@ jobs: PUBLISH_BRANCH: ${{ github.event.pull_request.base.ref }} run: pnpm --filter n8n publish --publish-branch "$PUBLISH_BRANCH" --access public --tag rc --no-git-checks - - name: Publish other packages to NPM with latest tag + - name: Publish other packages to NPM env: PUBLISH_BRANCH: ${{ github.event.pull_request.base.ref }} - run: pnpm publish -r --filter '!n8n' --publish-branch "$PUBLISH_BRANCH" --access public --no-git-checks + PUBLISH_TAG: ${{ needs.determine-version-info.outputs.track == 'stable' && 'latest' || needs.determine-version-info.outputs.track }} + run: | + # Prefix version-like track names (e.g. "1", "v1") to avoid npm rejecting them as semver ranges + if [[ "$PUBLISH_TAG" =~ ^v?[0-9] ]]; then + PUBLISH_TAG="release-${PUBLISH_TAG}" + fi + pnpm publish -r --filter '!n8n' --publish-branch "$PUBLISH_BRANCH" --access public --tag "$PUBLISH_TAG" --no-git-checks - name: Cleanup rc tag run: npm dist-tag rm n8n rc