fix package manager #226
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
# This workflow will run tests using node and then publish a package to GitHub Packages when package.json version is updated | |
name: Publish package | |
on: | |
push: | |
paths: | |
[ | |
'src/**', | |
'test/**', | |
'package.json', | |
'tsconfig.json', | |
'pnpm-lock.yaml', | |
'.github/workflows/npm-publish.yml' | |
] | |
branches: | |
- main | |
release: | |
types: [created] | |
jobs: | |
publish-npm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Setup pnpm | |
uses: pnpm/[email protected] | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm test | |
- run: pnpm package | |
- uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.npm_token }} | |
# - run: npm publish --access public | |
# env: | |
# NODE_AUTH_TOKEN: ${{secrets.npm_token}} |