diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..8cbe353 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,44 @@ +name: Publish Packages + +on: + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + + - name: Authenticate to npm + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc + + - name: Install dependencies + run: yarn install + + - name: Build packages + run: yarn run build + + - name: Run tests + run: yarn run test + + - name: Publish packages + run: | + cd packages/sdk-client && npm publish + cd ../numbers && npm publish + cd ../sms && npm publish + cd ../verification && npm publish + cd ../voice && npm publish + cd ../conversation && npm publish + cd ../fax && npm publish + cd ../elastic-sip-trunking && npm publish + cd ../sdk-core && npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/packages/conversation/package.json b/packages/conversation/package.json index 29ff5dc..4a71052 100644 --- a/packages/conversation/package.json +++ b/packages/conversation/package.json @@ -33,6 +33,7 @@ }, "devDependencies": {}, "publishConfig": { - "directory": "dist" + "directory": "dist", + "access": "public" } } diff --git a/packages/elastic-sip-trunking/package.json b/packages/elastic-sip-trunking/package.json index 89ea1cd..019438f 100644 --- a/packages/elastic-sip-trunking/package.json +++ b/packages/elastic-sip-trunking/package.json @@ -32,6 +32,7 @@ }, "devDependencies": {}, "publishConfig": { - "directory": "dist" + "directory": "dist", + "access": "public" } } diff --git a/packages/fax/package.json b/packages/fax/package.json index 1024cc2..05b8b21 100644 --- a/packages/fax/package.json +++ b/packages/fax/package.json @@ -33,6 +33,7 @@ }, "devDependencies": {}, "publishConfig": { - "directory": "dist" + "directory": "dist", + "access": "public" } } diff --git a/packages/numbers/package.json b/packages/numbers/package.json index a345935..9ddf77d 100644 --- a/packages/numbers/package.json +++ b/packages/numbers/package.json @@ -33,6 +33,7 @@ }, "devDependencies": {}, "publishConfig": { - "directory": "dist" + "directory": "dist", + "access": "public" } } diff --git a/packages/sdk-client/package.json b/packages/sdk-client/package.json index 53610b5..05fa28f 100644 --- a/packages/sdk-client/package.json +++ b/packages/sdk-client/package.json @@ -38,6 +38,7 @@ "typescript": "^5.2.2" }, "publishConfig": { - "directory": "dist" + "directory": "dist", + "access": "public" } } diff --git a/packages/sdk-core/package.json b/packages/sdk-core/package.json index 9296082..8d9d5c4 100644 --- a/packages/sdk-core/package.json +++ b/packages/sdk-core/package.json @@ -39,6 +39,7 @@ }, "devDependencies": {}, "publishConfig": { - "directory": "dist" + "directory": "dist", + "access": "public" } } diff --git a/packages/sms/package.json b/packages/sms/package.json index 5ca2964..4c5552f 100644 --- a/packages/sms/package.json +++ b/packages/sms/package.json @@ -33,6 +33,7 @@ }, "devDependencies": {}, "publishConfig": { - "directory": "dist" + "directory": "dist", + "access": "public" } } diff --git a/packages/verification/package.json b/packages/verification/package.json index 2dbfc3e..63213a3 100644 --- a/packages/verification/package.json +++ b/packages/verification/package.json @@ -33,6 +33,7 @@ }, "devDependencies": {}, "publishConfig": { - "directory": "dist" + "directory": "dist", + "access": "public" } } diff --git a/packages/voice/package.json b/packages/voice/package.json index 4ad1b2b..a27aff2 100644 --- a/packages/voice/package.json +++ b/packages/voice/package.json @@ -33,6 +33,7 @@ }, "devDependencies": {}, "publishConfig": { - "directory": "dist" + "directory": "dist", + "access": "public" } }