Skip to content

Commit

Permalink
ci: add publish
Browse files Browse the repository at this point in the history
  • Loading branch information
exuanbo committed Oct 24, 2024
1 parent 39dd27a commit d89802b
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish

on:
push:
tags:
- "v*"

workflow_dispatch:

jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version-file: ".nvmrc"
registry-url: "https://registry.npmjs.org"
- run: yarn install
- run: yarn build
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-jsr:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- run: npx jsr publish

0 comments on commit d89802b

Please sign in to comment.