Skip to content

Commit

Permalink
build: npm publish with npm workspaces (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
boweihan authored Sep 8, 2022
1 parent d059dbd commit b7a1fc3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
34 changes: 30 additions & 4 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,33 @@ jobs:
run: |
npm ci
npm run build
- name: Publish
run: npm run publishToNpm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish @iot-app-kit/core
uses: JS-DevTools/npm-publish@v1
with:
package: './packages/core/package.json'
token: ${{ secrets.NPM_TOKEN }}

- name: Publish @iot-app-kit/components
uses: JS-DevTools/npm-publish@v1
with:
package: './packages/components/package.json'
token: ${{ secrets.NPM_TOKEN }}

- name: Publish @iot-app-kit/source-iotsitewise
uses: JS-DevTools/npm-publish@v1
with:
package: './packages/source-iotsitewise/package.json'
token: ${{ secrets.NPM_TOKEN }}

- name: Publish @iot-app-kit/related-table
uses: JS-DevTools/npm-publish@v1
with:
package: './packages/related-table/package.json'
token: ${{ secrets.NPM_TOKEN }}

- name: Publish @iot-app-kit/react-components
uses: JS-DevTools/npm-publish@v1
with:
package: './packages/react-components/package.json'
token: ${{ secrets.NPM_TOKEN }}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
"link": "npm link -ws",
"versionup:patch": "npm version --no-git-tag-version -ws patch",
"versionup:minor": "npm version --no-git-tag-version -ws minor",
"versionup:major": "npm version --no-git-tag-version -ws major",
"publishToNpm": "npm publish -ws"
"versionup:major": "npm version --no-git-tag-version -ws major"
},
"devDependencies": {
"@babel/core": "^7.6.4",
Expand Down

0 comments on commit b7a1fc3

Please sign in to comment.