feat: viz-node (#187) #162
This file contains hidden or 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
| name: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Generate API Documentation | |
| run: | | |
| pnpm run build:docs | |
| - name: Create Release Pull Request or Publish to npm | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| publish: pnpm run publish | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Update jsr.json | |
| run: | | |
| jq --arg version "$(jq -r '.version' ./packages/core/package.json)" '.version = $version' ./packages/core/jsr.json > tmp.json && mv tmp.json ./packages/core/jsr.json | |
| pnpm exec biome format --write ./packages/core/jsr.json | |
| - name: Remove unsued changelog | |
| run: | | |
| rm -rf ./docs/CHANGELOG.md | |
| - name: Commit lock file | |
| continue-on-error: true | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "chore: update jsr.json" | |
| branch: changeset-release/main | |
| file_pattern: "**/jsr.json **/CHANGELOG.md" | |
| # Blocked by upstream issue: https://github.com/jsr-io/jsr/issues/543 | |
| # | |
| # publish: | |
| # name: Publish to jsr | |
| # runs-on: ubuntu-latest | |
| # permissions: | |
| # contents: read | |
| # id-token: write | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - uses: pnpm/action-setup@v4 | |
| # - name: Setup Node.js | |
| # uses: actions/setup-node@v4 | |
| # with: | |
| # node-version: 22 | |
| # cache: "pnpm" | |
| # - name: Install dependencies | |
| # run: pnpm install | |
| # - run: pnpm dlx jsr publish --allow-slow-types | |
| # working-directory: ./packages/core |