- Notifications
You must be signed in to change notification settings - Fork0
ci(release): change the branchs master to main in release.yml#6
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:release | |
| on: | |
| pull_request: | |
| types:[closed] | |
| branches: | |
| -main | |
| workflow_dispatch:{} | |
| jobs: | |
| publish: | |
| if:github.event.pull_request.merged == true | |
| runs-on:ubuntu-latest | |
| permissions: | |
| contents:write | |
| pull-requests:write | |
| id-token:write# for npm provenance | |
| steps: | |
| -name:Checkout | |
| uses:actions/checkout@v4 | |
| -name:Setup pnpm | |
| uses:pnpm/action-setup@v4 | |
| with: | |
| version:10 | |
| -name:Setup Node.js | |
| uses:actions/setup-node@v4 | |
| with: | |
| node-version:20 | |
| registry-url:'https://registry.npmjs.org' | |
| cache:'pnpm' | |
| -name:Install dependencies | |
| run:pnpm install --frozen-lockfile | |
| -name:Test | |
| run:pnpm run --if-present test | |
| -name:Build | |
| run:pnpm run --if-present release:build || pnpm run --if-present build | |
| -name:Changesets - Version or Publish | |
| uses:changesets/action@v1 | |
| with: | |
| version:pnpm run changeset:version | |
| publish:pnpm run changeset:publish | |
| env: | |
| GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN:${{ secrets.NPM_TOKEN }} | |
| NPM_CONFIG_PROVENANCE:true | |