Skip to content

Commit

Permalink
Refactor GitHub Actions workflow for npm package publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
a179346 committed Sep 17, 2024
1 parent 8575c0e commit ab1c33a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ name: Publish NPM Package

on:
release:
types: [created]
types: [published]

jobs:
publish-npm-packages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get tags
run: git fetch --tags origin
- name: Setup Node.js
uses: actions/setup-node@v2
with:
Expand All @@ -20,6 +18,6 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Publish packages
run: npm run publish-packages
run: npx lerna publish ${{ github.event.release.tag_name }} --yes
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"lint": "lerna run lint",
"build": "lerna run build",
"test": "lerna run test",
"prepack": "npm test",
"publish-packages": "lerna publish from-git --yes"
"prepack": "npm test"
},
"workspaces": [
"packages/*"
Expand Down

0 comments on commit ab1c33a

Please sign in to comment.