fix: add prepublish script to compile before publishing #8
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: Publish to npm | |
on: | |
push: | |
branches: ["master"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup pnpm and install dependencies | |
uses: pnpm/action-setup@v4 | |
with: | |
version: latest | |
run_install: true | |
- name: Compile | |
run: pnpm compile | |
- name: Publish | |
run: pnpm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |