From 098908d05b59126cdce5fadc07e370f85cde310a Mon Sep 17 00:00:00 2001 From: Rajeh Taher Date: Sun, 28 Apr 2024 14:39:04 +0300 Subject: [PATCH] feat(fix-workflow): push to the 2 npm packages at the same time (#746) --- .github/workflows/publish-release.yml | 10 +++++++++- package.json | 5 +++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index dcc3e2e..4655819 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -44,7 +44,7 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Publish in NPM + - name: Publish in NPM (as `baileys`) run: npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -79,3 +79,11 @@ jobs: baileys.tgz gzip: folders allow_override: true + + - name: Publish in NPM (whiskeysockets scope) + run: | + json -I -f package.json -e "this.name='@whiskeysockets/baileys'" + npm publish --access public + json -I -f package.json -e "this.name='baileys'" + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index e99e38b..f655256 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@whiskeysockets/baileys", + "name": "baileys", "version": "6.6.0", "description": "WhatsApp API", "keywords": [ @@ -77,7 +77,8 @@ "ts-jest": "^27.0.3", "ts-node": "^10.8.1", "typedoc": "^0.24.7", - "typescript": "^4.6.4" + "typescript": "^4.6.4", + "json": "^11.0.0" }, "peerDependencies": { "jimp": "^0.16.1",