Skip to content

🔄 将 npm 包新版本同步到 npm 镜像,支持 npmmirror.com

License

Notifications You must be signed in to change notification settings

FrontEndDev-org/npm-mirror-sync-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

npm-mirror-sync-action

code-review dependency-review Codacy Badge release marketplace license

🔄 将 npm 包新版本同步到 npm 镜像,支持 npmmirror.com

工作流样例

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - run: npm ci
      - run: npm run build
      - uses: FrontEndDev-org/publish-node-package-action@v1
        with:
          target: npm
          token: ${{ secrets.NPM_TOKEN }}
      - name: 自动将上一步发布的的 npm 包版本同步到 npmmirror.com
        uses: FrontEndDev-org/npm-mirror-sync-action@v1

配置项

参数名 可选性 描述
name 可选 待同步的 npm 包名称,默认从当前目录 package.json 里读取
target 可选 同步镜像的目标,默认 npmmirror(即 npmmirror.com),暂无其他可选值
timeout 可选 同步超时时间,默认 30 秒