v0.4.1 #17
Workflow file for this run
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 Release (npm) | |
| on: | |
| release: | |
| types: [published] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.x | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Lint | |
| run: npm run lint | |
| - name: Install playwright | |
| run: npx playwright install --with-deps | |
| - name: Test | |
| run: npm test | |
| - name: Build | |
| run: npm run build | |
| publish-npm: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.x | |
| registry-url: "https://registry.npmjs.org" | |
| cache: "npm" | |
| - run: npm ci | |
| - run: npm run build | |
| - run: npm version ${TAG_NAME} --git-tag-version=false | |
| env: | |
| TAG_NAME: ${{ github.ref_name }} | |
| - run: npm publish --provenance --access public --tag next | |
| if: "github.event.release.prerelease" | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_SECRET }} | |
| - run: npm publish --provenance --access public | |
| if: "!github.event.release.prerelease" | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_SECRET }} |