From 61e939907a224a17a97dd1efd617252ab25c4bd1 Mon Sep 17 00:00:00 2001 From: Next Date: Sun, 11 Oct 2026 13:50:43 +0800 Subject: [PATCH] chore: migrate publishing to semicoder-dev for 0.7.1 --- .github/workflows/publish-npm.yml | 4 ++-- README.md | 4 ++-- docs/npm-release.md | 8 ++++++-- package.json | 8 ++++---- scripts/npm/check.ts | 2 +- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 2222ea1..54193b2 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -14,7 +14,7 @@ concurrency: jobs: build: - if: github.repository == 'potato47/agent-webtool' + if: github.repository == 'semicoder-dev/agent-webtool' runs-on: ubuntu-latest timeout-minutes: 15 outputs: @@ -51,7 +51,7 @@ jobs: publish: needs: build - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'potato47/agent-webtool' + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'semicoder-dev/agent-webtool' runs-on: ubuntu-latest timeout-minutes: 10 environment: npm diff --git a/README.md b/README.md index a831ba1..d735b80 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # agent-webtool [![npm version](https://img.shields.io/npm/v/agent-webtool.svg)](https://www.npmjs.com/package/agent-webtool) -[![GitHub](https://img.shields.io/badge/GitHub-potato47%2Fagent--webtool-181717?logo=github)](https://github.com/potato47/agent-webtool) +[![GitHub](https://img.shields.io/badge/GitHub-potato47%2Fagent--webtool-181717?logo=github)](https://github.com/semicoder-dev/agent-webtool) [![license](https://img.shields.io/npm/l/agent-webtool.svg)](./LICENSE) Web fetch and multi-engine search tools for AI agents. Use it as a JavaScript/TypeScript @@ -400,7 +400,7 @@ Search and fetch dependency options both accept an `AbortSignal`. TypeScript typ ## Development ```bash -git clone https://github.com/potato47/agent-webtool.git +git clone https://github.com/semicoder-dev/agent-webtool.git cd agent-webtool bun install bun run check # lint, format, source types, and package metadata diff --git a/docs/npm-release.md b/docs/npm-release.md index b389635..5ebcea7 100644 --- a/docs/npm-release.md +++ b/docs/npm-release.md @@ -1,6 +1,6 @@ # GitHub 检查与 npm 发布 -包:`agent-webtool`;仓库:`potato47/agent-webtool`。本流程参考 FIA 和麻辣烫的“先验收归档、后发布同一归档”,以及 Semicoder 的独立质量检查。agent-webtool 是 npm 工具包,不部署网站服务;官网由独立 Semicoder 仓库发布。 +包:`agent-webtool`;仓库:`semicoder-dev/agent-webtool`。本流程参考 FIA 和麻辣烫的“先验收归档、后发布同一归档”,以及 Semicoder 的独立质量检查。agent-webtool 是 npm 工具包,不部署网站服务;官网由独立 Semicoder 仓库发布。 ## 工作流 @@ -12,11 +12,15 @@ CI 使用 Bun 1.4.2,覆盖 Linux Node 20.18.1 / 24 和 macOS Node 24;发布 job 使用 GitHub 托管 Linux runner、Node 24、npm 11.19.0。Action 使用提交 SHA 固定。正式版本发布到 `latest`,预发布到 `next`;暂不接受 SemVer build metadata。PR 没有 npm 发布权限,只有发布 job 获得 `id-token: write`。 +## 组织迁移配置 + +旧 Trusted Publisher 身份字段不可修改;在最终归档就绪后删除旧连接,并创建组织连接,明确允许 `npm publish`。新连接必须在两天内首次成功发布。环境继续使用精确版本标签许可,不添加长期 npm token。 + ## 首次配置 1. 经审阅将工作流推送到仓库默认分支;手动入口需要它已存在于默认分支。 2. 在 GitHub Settings → Environments 创建 `npm` 环境;按维护者的保护策略允许本次版本标签,保留已有审核要求。 -3. 在 npm 的 `agent-webtool` Settings → Trusted Publisher 配置:用户 `potato47`,仓库 `agent-webtool`,工作流文件名 `publish-npm.yml`,环境 `npm`,允许直接 `npm publish`。 +3. 在 npm 的 `agent-webtool` Settings → Trusted Publisher 配置:组织 `semicoder-dev`,仓库 `agent-webtool`,工作流文件名 `publish-npm.yml`,环境 `npm`,允许直接 `npm publish`。 4. 手动运行 **Publish agent-webtool**,先验证 GitHub runner 上的构建和归档消费;实际 OIDC 发布权限仍需下一次获授权的新版本发布验证。 不需要 `NPM_TOKEN` 或 `NODE_AUTH_TOKEN` secret。npm 官方要求支持 OIDC 的 npm / Node 版本与 GitHub 托管 runner,参见 [Trusted publishing](https://docs.npmjs.com/trusted-publishers/)。包的 `repository.url`、workflow 仓库限制和 npm 发布者配置必须对应同一仓库;迁移时一起更新。 diff --git a/package.json b/package.json index b18bba2..de28096 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "agent-webtool", - "version": "0.7.0", + "version": "0.7.1", "description": "Web fetch and multi-engine search tools for AI agents (SDK + CLI + MCP server). No API keys required.", "keywords": [ "agent", @@ -17,14 +17,14 @@ "web-search", "wechat" ], - "homepage": "https://github.com/potato47/agent-webtool#readme", + "homepage": "https://github.com/semicoder-dev/agent-webtool#readme", "bugs": { - "url": "https://github.com/potato47/agent-webtool/issues" + "url": "https://github.com/semicoder-dev/agent-webtool/issues" }, "license": "MIT", "repository": { "type": "git", - "url": "git+https://github.com/potato47/agent-webtool.git" + "url": "git+https://github.com/semicoder-dev/agent-webtool.git" }, "bin": { "agent-webtool": "./dist/cli.mjs", diff --git a/scripts/npm/check.ts b/scripts/npm/check.ts index 8ccee30..111e36a 100644 --- a/scripts/npm/check.ts +++ b/scripts/npm/check.ts @@ -3,7 +3,7 @@ import { fileURLToPath } from "node:url"; import { z } from "zod"; export const root = fileURLToPath(new URL("../../", import.meta.url)); -export const repository = "potato47/agent-webtool"; +export const repository = "semicoder-dev/agent-webtool"; export const registry = "https://registry.npmjs.org"; export function assert(condition: unknown, message: string): asserts condition {