v0.4.0 #4
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: Release | |
on: | |
release: | |
types: [published] | |
env: | |
lockfile: pnpm-lock.yaml | |
node_version: "20" | |
jobs: | |
npm-publish: | |
name: Publish to NPM | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
name: Install PNPM | |
id: pnpm-install | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.node_version }} | |
cache: pnpm | |
cache-dependency-path: ${{ env.lockfile }} | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build dist | |
run: pnpm run build | |
- name: Publish to npm | |
id: publish | |
run: | | |
pnpm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} | |
pnpm publish --access public --no-git-checks |