From ce1cc1fc4148327d53b3b3c0bf5677cba35fabc7 Mon Sep 17 00:00:00 2001 From: zhanghengxin <812718649@qq.com> Date: Wed, 24 May 2023 10:51:57 +0800 Subject: [PATCH] Update publish_npm.yaml use the latest tag. Signed-off-by: zhanghengxin <812718649@qq.com> --- .github/workflows/publish_npm.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish_npm.yaml b/.github/workflows/publish_npm.yaml index 67e0f7d..3d49e81 100644 --- a/.github/workflows/publish_npm.yaml +++ b/.github/workflows/publish_npm.yaml @@ -20,10 +20,10 @@ jobs: registry-url: https://registry.npmjs.org/ - name: Get version id: get_version - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} + run: echo ::set-output name=VERSION::$( git describe --abbrev=0 ) - name: Get commit id id: get_commit_id - run: echo ::set-output name=COMMIT_ID::$(git rev-parse --short "$GITHUB_SHA") + run: echo ::set-output name=COMMIT_ID::${{ github.sha }} - name: Set version run: | sudo apt-get install jq