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] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup PNPM | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Setup Node | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version: 24.x | |
| cache: pnpm | |
| - name: Install Dependencies | |
| run: pnpm install | |
| - name: Install Clipboard Tool | |
| run: sudo apt-get update && sudo apt-get install -y xsel xvfb | |
| - name: Build | |
| run: pnpm build | |
| - name: Lint | |
| run: pnpm lint | |
| - name: Download Playwright binaries | |
| run: pnpm exec playwright install chromium | |
| - name: Test | |
| run: xvfb-run -a pnpm test | |
| publish-npm: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup PNPM | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version: 24.x | |
| cache: 'pnpm' | |
| - run: pnpm install | |
| - run: npm i -g npm@latest | |
| - run: pnpm build | |
| - run: pnpm 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' | |
| - run: npm publish --provenance --access public | |
| if: '!github.event.release.prerelease' |