fix: Improve cjs compatibility (#40) #19
Workflow file for this run
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: Publish Package | |
on: | |
push: | |
tags: | |
- "v*.*.*" # Trigger on stable version tags for production releases | |
jobs: | |
publish: | |
if: startsWith(github.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Out Code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "22" | |
cache: "npm" | |
registry-url: "https://registry.npmjs.org/" | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run ESLint | |
run: npm run lint | |
- name: Run Tests | |
run: npm test | |
- name: Build Package | |
run: npm run build | |
- name: Publish Stable to npm | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |