From d78cbb6b6e38a1fe1566564baa55ea44f198cfc4 Mon Sep 17 00:00:00 2001 From: Simon <10131203+gaomeng1900@users.noreply.github.com> Date: Mon, 19 Jan 2026 19:41:39 +0800 Subject: [PATCH] chore(release): enhance npm publish for prerelease tags --- .github/workflows/release.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec0bb3c..09aa2d8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,4 +32,12 @@ jobs: run: npm run build:libs - name: Publish all public packages - run: npm publish --workspaces --access public + run: | + VERSION=${GITHUB_REF#refs/tags/v} + if [[ "$VERSION" == *"-"* ]]; then + # Prerelease version (e.g., 0.3.0-beta.1) -> extract tag name before the dot + TAG=$(echo "$VERSION" | sed 's/.*-\([a-zA-Z]*\).*/\1/') + npm publish --workspaces --access public --tag "$TAG" + else + npm publish --workspaces --access public + fi