Publish package to npm registry #7
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: npm-publish | |
run-name: Publish package to npm registry | |
on: | |
push: | |
tags: | |
- "v*" # Push events that match v*, eg v1.1 | |
jobs: | |
publish: | |
name: Publish package to npmjs.com | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/[email protected] | |
- name: Set up Node version to 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
registry-url: "https://registry.npmjs.org" | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build package | |
run: pnpm build | |
- name: Publish package | |
run: pnpm --filter=scaf publish --access public | |
# workaround for the "moduleResolution": "node" issue is fixed | |
if: always() | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |