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: Deploy JigsawStack Package to NPM and JSR when a Release is Created | |
| on: | |
| release: | |
| types: [created] | |
| workflow_dispatch: | |
| jobs: | |
| npm-publish: | |
| name: Publish to NPM | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.x" | |
| registry-url: "https://registry.npmjs.org" | |
| # Ensure npm is new enough for Trusted Publishing (>= 11.5.1) | |
| - name: Update npm | |
| run: npm install -g npm@latest | |
| - name: Enable corepack (yarn) | |
| run: corepack enable | |
| - name: Install deps | |
| run: yarn install --frozen-lockfile | |
| - name: Build package | |
| run: yarn build | |
| - name: Publish to NPM | |
| run: npm publish --provenance --access public | |
| jsr-publish: | |
| name: Publish to JSR | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.x" | |
| - name: Build package | |
| run: | | |
| yarn | |
| yarn build | |
| - name: Publish to JSR | |
| run: npx jsr publish --allow-slow-types |