Skip to content

Commit

Permalink
chore: update npm-publish.yml to trigger on push and pull request events
Browse files Browse the repository at this point in the history
  • Loading branch information
szhshp committed Dec 23, 2024
1 parent 6fc4945 commit 2ad5edd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 49 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@
name: Node.js Package

on:
release:
types: [created]
push:
branches:
- main
workflow_dispatch:
pull_request:
branches:
- main


jobs:
build:
Expand All @@ -15,9 +21,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm test
- run: npm build
- run: |
cd core
npm ci
npm test
npm build
publish-npm:
needs: build
Expand All @@ -28,7 +36,9 @@ jobs:
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
- run: |
cd core
npm ci
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
24 changes: 0 additions & 24 deletions cli/package-lock.json

This file was deleted.

18 changes: 0 additions & 18 deletions cli/package.json

This file was deleted.

0 comments on commit 2ad5edd

Please sign in to comment.