From 558b121df65bc31eb486f14ec555c1875519b704 Mon Sep 17 00:00:00 2001 From: timzhong2000 Date: Sat, 22 Aug 2026 21:39:05 +0800 Subject: [PATCH] Publish npm package under timzhong2000 --- .github/workflows/npm-publish.yml | 11 +++++++++-- README.md | 2 +- README_zh.md | 2 +- npm/README.md | 4 ++-- npm/package.json | 2 +- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 8ee4c05..112d513 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -86,12 +86,19 @@ jobs: shell: bash working-directory: npm env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + BOOTSTRAP_NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: | name="$(node -p "require('./package.json').name")" version="$(node -p "require('./package.json').version")" if npm view "$name@$version" version >/dev/null 2>&1; then echo "$name@$version is already published" else - npm publish --access public --provenance + if [[ -n "$BOOTSTRAP_NPM_TOKEN" ]]; then + export NODE_AUTH_TOKEN="$BOOTSTRAP_NPM_TOKEN" + echo "Publishing with the bootstrap npm token" + else + unset NODE_AUTH_TOKEN + echo "Publishing with npm trusted publishing" + fi + npm publish --access public fi diff --git a/README.md b/README.md index 98b3aff..ce45a83 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ brew install timzhong1024/tap/run-code You can also install the prebuilt binary through npm: ```bash -npm install --global @timzhong/run-code +npm install --global @timzhong2000/run-code ``` Or install from source: diff --git a/README_zh.md b/README_zh.md index d07a03a..b3b2654 100644 --- a/README_zh.md +++ b/README_zh.md @@ -15,7 +15,7 @@ brew install timzhong1024/tap/run-code 也可以通过 npm 安装预编译 binary: ```bash -npm install --global @timzhong/run-code +npm install --global @timzhong2000/run-code ``` 或者从源码安装: diff --git a/npm/README.md b/npm/README.md index 17fedb8..ec2bedd 100644 --- a/npm/README.md +++ b/npm/README.md @@ -1,9 +1,9 @@ -# @timzhong/run-code +# @timzhong2000/run-code Prebuilt npm distribution of [`run-code`](https://github.com/timzhong1024/run-code). ```bash -echo 'print("hello")' | npx @timzhong/run-code python +echo 'print("hello")' | npx @timzhong2000/run-code python ``` The package selects the bundled binary for the current operating system and CPU architecture. diff --git a/npm/package.json b/npm/package.json index 6313abc..c5812a7 100644 --- a/npm/package.json +++ b/npm/package.json @@ -1,5 +1,5 @@ { - "name": "@timzhong/run-code", + "name": "@timzhong2000/run-code", "version": "0.0.0-development", "description": "Run temporary Python, TypeScript, JavaScript, Rust, Go, or C# snippets with pinned toolchains and dependencies", "type": "module",