Skip to content

Convert to Node

Convert to Node #56

Workflow file for this run

name: pipeline
on: [push, pull_request]
jobs:
pipeline:
name: pipeline
strategy:
matrix:
node: ["latest", "lts/*"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/[email protected]
with:
version: 9.x.x
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: "pnpm"
- name: Install and build
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm check
- name: Build
run: pnpm build
- name: Test
run: pnpm test
publish:
name: publish
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs: pipeline
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/[email protected]
with:
version: 9.x.x
- uses: actions/setup-node@v4
with:
node-version: latest
registry-url: "https://registry.npmjs.org"
cache: "pnpm"
- name: Install and build
run: pnpm install --frozen-lockfile
- name: npm build
run: pnpm release
- name: publish NPM
run: pnpm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish package
run: pnpm dlx jsr publish
- name: create release
uses: softprops/action-gh-release@v2
with:
body_path: CHANGELOG.md