Skip to content

chore: add jsr gh actions #19

chore: add jsr gh actions

chore: add jsr gh actions #19

Workflow file for this run

name: Publish
on:
push:
branches:
- main
- chore/jsr
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Install corepack
run: npm install -g corepack && corepack enable
- name: Install dependencies
run: pnpm install
- name: Build and test
run: pnpm build && pnpm test
# - name: Publish package
# run: npm publish --access public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish package on JSR
run: pnpm dlx jsr publish