rev #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: Publish | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '.changeset/**' | |
| - '.github/workflows/publish.yml' | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write # Required for OIDC | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.11.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Overwrite npmrc with auth only | |
| run: | | |
| echo "//registry.npmjs.org/:_authToken=\${NODE_AUTH_TOKEN}" > /home/runner/work/_temp/.npmrc | |
| echo ">>> New .npmrc contents:" | |
| cat /home/runner/work/_temp/.npmrc | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile=false | |
| - name: Create Release PR or Publish | |
| uses: changesets/action@v1 | |
| with: | |
| version: pnpm ci:version | |
| publish: pnpm ci:release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |