Convert to Node #55
Workflow file for this run
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
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/action-setup@v4.0.0 | |
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/action-setup@v4.0.0 | |
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 |