update actions #15
This file contains 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
# Publish to JSR. | |
name: JSR Package | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
- run: npm install pnpm -g | |
- run: pnpm install | |
- name: Run test cases | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- run: pnpm test | |
publish-jsr: | |
needs: test | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Publish JSR | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
- run: npm install pnpm jsr -g | |
- run: pnpm install | |
- run: jsr publish |