Skip to content

Commit

Permalink
Update npm-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tychenjiajun authored Aug 31, 2024
1 parent 90285ec commit 5360c8c
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,30 @@ on:
types: [created]

jobs:
build:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
node-version: 20
- uses: pnpm/[email protected]
with:
version: 9,
# Version of pnpm to install
run_install: true
- run: pnpm build

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
version: 9
run_install: false

- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm run build

- run: pnpm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 comments on commit 5360c8c

Please sign in to comment.