From 86c68723a45cfc0a946c5e418ab5f4071cf397fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=87=AF90331?= <90331@sangfor.com> Date: Thu, 14 May 2026 17:07:16 +0800 Subject: [PATCH] ci(publish-npm): drop v prefix from tags and skip tests Use the exact input version for git tags without adding a v prefix. Also comment out typecheck and test steps to speed up the publish flow. Co-authored-by: CoStrict --- .github/workflows/publish-npm.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index ddcd70bc5..052933594 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -31,7 +31,7 @@ jobs: run: | RAW="${{ github.event.inputs.version || github.ref_name }}" RAW_NO_V="${RAW#v}" - TAG="v${RAW_NO_V}" + TAG="${RAW_NO_V}" echo "raw=${RAW_NO_V}" >> "$GITHUB_OUTPUT" echo "tag=${TAG}" >> "$GITHUB_OUTPUT" @@ -78,8 +78,8 @@ jobs: # - name: Type check # run: bun run typecheck - - name: Run tests - run: bun test + # - name: Run tests + # run: bun test - name: Publish to npm if: ${{ !github.event.inputs.dry_run }} @@ -98,7 +98,7 @@ jobs: id: changelog run: | VERSION="${{ steps.version.outputs.tag }}" - PREV_TAG=$(git tag --sort=-version:refname | grep -v "^${VERSION#v}$" | head -1) + PREV_TAG=$(git tag --sort=-version:refname | grep -v "^${VERSION}$" | head -1) if [ -n "$PREV_TAG" ]; then COMMITS=$(git log "${PREV_TAG}..${VERSION}" --pretty=format:"- %s (%h)" --no-merges)