Publish JSR #2
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 JSR | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| publish: | |
| description: Run the real JSR publish after the dry run passes | |
| required: true | |
| default: "false" | |
| type: choice | |
| options: | |
| - "false" | |
| - "true" | |
| jobs: | |
| publish: | |
| name: Publish JSR workspace | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js environment | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Set up Deno | |
| uses: denoland/setup-deno@v2 | |
| with: | |
| deno-version: v2.x | |
| - name: Install Dependencies | |
| run: pnpm i | |
| - name: Install Deno dependencies | |
| run: | | |
| if [ -f deno.lock ]; then | |
| deno ci | |
| else | |
| deno install | |
| fi | |
| - name: Sync deno.jsonc versions from package.json | |
| run: pnpm jsr:sync-versions | |
| - name: Build packages | |
| run: pnpm build | |
| - name: Publish dry run | |
| run: deno publish --dry-run --check --allow-slow-types | |
| - name: Publish to JSR | |
| if: ${{ inputs.publish == 'true' }} | |
| run: deno publish --check --allow-slow-types |