diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml deleted file mode 100644 index ae8b083..0000000 --- a/.github/workflows/dependency-review.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Dependency Review - -on: - pull_request: - branches: [main] - -jobs: - review: - runs-on: ubuntu-latest - - permissions: - contents: read - pull-requests: write - - steps: - - name: 检查代码 - uses: actions/checkout@v6 - - - name: 依赖变更审查 - uses: actions/dependency-review-action@v4 - with: - fail-on-severity: high - comment-summary-in-pr: always diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..c22a028 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: Publish to npm + +on: + release: + types: [published] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - uses: pnpm/action-setup@v6 + + - uses: actions/setup-node@v6 + with: + node-version: 22 + cache: pnpm + registry-url: https://registry.npmjs.org + + - run: pnpm install --frozen-lockfile + + - run: pnpm build + + - run: pnpm -r publish --access public --no-git-checks + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index eff8229..09e0185 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -20,25 +20,3 @@ jobs: config-file: .release-please/config.json manifest-file: .release-please/manifest.json - publish: - needs: release-please - if: ${{ needs.release-please.outputs.releases_created }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - uses: pnpm/action-setup@v6 - - - uses: actions/setup-node@v6 - with: - node-version: 22 - cache: pnpm - registry-url: https://registry.npmjs.org - - - run: pnpm install --frozen-lockfile - - - run: pnpm build - - - run: pnpm -r publish --access public --no-git-checks - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.release-please/config.json b/.release-please/config.json index 6a955f6..e1d4e66 100644 --- a/.release-please/config.json +++ b/.release-please/config.json @@ -10,7 +10,6 @@ "changelog-header": "# Changelog\n\n本文档记录 OpenAgent 的所有重要变更。", "packages": { ".": { - "component": "oa", "extra-files": [ "packages/core/package.json", "packages/agents/package.json",