Skip to content

Commit

Permalink
Merge pull request #116 from EastSun5566/ci/add-publish-to-jsr-step
Browse files Browse the repository at this point in the history
ci: update release workflow to publish to NPM and JSR
  • Loading branch information
EastSun5566 authored Oct 12, 2024
2 parents 83617ae + ce4a52a commit 0e6429d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,30 @@ jobs:
pnpm i
pnpm test
publish-npm:
publish:
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/
- uses: pnpm/action-setup@v4
- run: |
pnpm i
pnpm publish --no-git-checks
- name: Install deps
run: pnpm i
- name: Publish to NPM
run: pnpm publish --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish to JSR
run: pnpm dlx jsr publish

deploy-demo:
needs: publish-npm
needs: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

[![NPM Version](https://img.shields.io/npm/v/cc-gram.svg?style=for-the-badge)](https://www.npmjs.com/package/cc-gram)
[![NPM Downloads](https://img.shields.io/npm/dt/cc-gram.svg?style=for-the-badge)](https://www.npmjs.com/package/cc-gram)
![JSR Version](https://img.shields.io/jsr/v/%40eastsun5566/cc-gram?style=for-the-badge)
[![Test Status](https://img.shields.io/github/actions/workflow/status/EastSun5566/cc-gram/test.yml?style=for-the-badge)](https://github.com/EastSun5566/cc-gram/actions/workflows/test.yml)
[![License](https://img.shields.io/github/license/EastSun5566/cc-gram.svg?style=for-the-badge)](https://github.com/EastSun5566/cc-gram/blob/main/LICENSE)

Expand Down

0 comments on commit 0e6429d

Please sign in to comment.