From 02c9c7af3ce52d1f8146690470d32eecbb17c973 Mon Sep 17 00:00:00 2001 From: xRain Date: Tue, 31 Mar 2026 06:47:38 +0800 Subject: [PATCH] fix ci --- .github/workflows/publish.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2159bc5..aac057c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,7 +3,7 @@ name: Publish to npm on: push: tags: - - 'v*.*.*' + - '*' workflow_dispatch: jobs: @@ -13,8 +13,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: Setup Node.js uses: actions/setup-node@v4 @@ -24,7 +22,9 @@ jobs: - name: Get version from tag id: version - run: echo "version=$(echo $GITHUB_REF | sed 's/refs\/tags\///')" >> $GITHUB_OUTPUT + run: | + VERSION="${GITHUB_REF#refs/tags/}" + echo "version=$VERSION" >> $GITHUB_OUTPUT - name: Update package.json version run: npm pkg set version=${{ steps.version.outputs.version }} @@ -43,7 +43,5 @@ jobs: with: body: | ## @simcu/simapi v${{ steps.version.outputs.version }} - - See [changelog](https://github.com/simcu/simapi-vue/releases) for details. env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}