feat: publish neug-query #1260
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: Prepare Publish npm packages | |
| on: | |
| push: | |
| branches: | |
| - '**' # 匹配所有分支 | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| # 当具有 release 标签的 PR 被合并时,自动发布包版本 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 18 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: false | |
| - name: Cache pnpm modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| .pnpm-store | |
| node_modules | |
| key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm- | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Publish | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: pnpm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN} & pnpm run check:publish |