Skip to content

Publish to JSR

Publish to JSR #5

Workflow file for this run

---
name: Publish to JSR
on:
release:
types: [published]
permissions:
contents: read
id-token: write
jobs:
publish:
name: Publish to JSR
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # The OIDC ID token is used for authentication with JSR.
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensure all branches and tags are fetched
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: latest
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
cache-dependency-path: ./pnpm-lock.yaml
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies
run: pnpm install
- name: Determine Branch
run:
echo "BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
- name: Publish to JSR
run: pnpm dlx jsr publish