Publish #1
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: | |
| workflow_dispatch: | |
| inputs: | |
| release-type: | |
| type: choice | |
| description: Type of the release | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| env: | |
| PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.cache/ms-playwright | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup-and-cache | |
| with: | |
| node-version: 22 | |
| - name: Install & Build | |
| run: | | |
| pnpm install | |
| pnpm build | |
| - name: Configure github-actions git | |
| run: | | |
| git config --global user.name 'github-actions' | |
| git config --global user.email '[email protected]' | |
| - name: Bump version | |
| run: pnpm version ${{ github.event.inputs.release-type }} | |
| - name: Push release tag | |
| run: git push origin main --follow-tags | |
| - name: Publish to npm | |
| run: pnpm publish --provenance | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |