🐛 fix: adjust publish workflow #15
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: | |
- main | |
# tags: | |
# - "*" | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup bun | |
uses: oven-sh/setup-bun@v1 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: | |
# - name: Setup node | |
# uses: actions/setup-node@v4 | |
# with: | |
# node-version-file: .nvmrc | |
# node-version: 20 | |
# registry-url: https://registry.npmjs.org | |
- name: Set publishing config | |
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}" | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
- name: 🔧 Install and build | |
run: bun i && bun run build | |
- name: 📦 Publish package on NPM | |
run: pnpm publish --access public |