From ca9f6605ee0d85caa44938cfdd4d2a04d34cef19 Mon Sep 17 00:00:00 2001 From: ityuany <519495771@qq.com> Date: Tue, 24 Sep 2024 17:46:00 +0800 Subject: [PATCH] debug --- .github/workflows/release.yml | 8 ++++---- package.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c2b2672..11cd1f0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true - + jobs: build: strategy: @@ -401,11 +401,10 @@ jobs: - name: Publish run: | npm config set provenance true - TAG=${{github.ref_name}} echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc - if echo "$TAG" | grep -q "^v[0-9]\+\.[0-9]\+\.[0-9]\+$"; then + if echo "$GITHUB_REF_NAME" | grep -q "^v[0-9]\+\.[0-9]\+\.[0-9]\+$"; then npm publish --access public - elif echo "$TAG" | grep -q "^v[0-9]\+\.[0-9]\+\.[0-9]\+"; then + elif echo "$GITHUB_REF_NAME" | grep -q "^v[0-9]\+\.[0-9]\+\.[0-9]\+"; then npm publish --tag next --access public else echo "Not a release, skipping publish" @@ -413,6 +412,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_REF_NAME: ${{ github.ref_name }} update-release: diff --git a/package.json b/package.json index e0c83aa..60e2da6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@shined/source-code-diagnosis", - "version": "0.0.32", + "version": "0.0.33", "main": "index.js", "types": "index.d.ts", "napi": { @@ -54,7 +54,7 @@ "build:js": "napi build --cargo-cwd crates/binding --platform --js index.js --dts index.d.ts", "build": "napi build --cargo-cwd crates/binding --platform --release", "build:debug": "napi build --cargo-cwd crates/binding --platform", - "prepublishOnly": "napi prepublish -t npm", + "prepublishOnly": "napi prepublish -t npm --gh-release-id $GITHUB_REF_NAME", "test:ava": "ava", "test": "vitest run", "universal": "napi universal",