This repository was archived by the owner on Jan 10, 2025. It is now read-only.
fix: 🐛 修复登陆二维码依赖第三方网站被墙的问题 (#269) #39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish CLI Package | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| publish-cli: | |
| if: contains(github.event.head_commit.message, 'Publish npm') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| # 设置 Node.js 环境 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: '18' | |
| registry-url: 'https://registry.npmjs.org' | |
| # 安装 pnpm | |
| - name: Install pnpm | |
| run: npm install -g pnpm | |
| # 安装依赖 | |
| - name: Install Dependencies | |
| run: pnpm install | |
| working-directory: ./packages/cli | |
| # 构建(如果需要) | |
| - name: Build package | |
| run: pnpm run build | |
| working-directory: ./packages/cli | |
| # 发布到 npm | |
| - name: Publish to npm | |
| run: pnpm publish --access public | |
| working-directory: ./packages/cli | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_SECRET }} |