From 070f4097f948c839cad098e614c2a4b5d78b3fd7 Mon Sep 17 00:00:00 2001 From: Francois Levasseur Date: Mon, 25 Mar 2024 11:28:37 -0400 Subject: [PATCH] chore: add gh wf to publish packages on npm --- .github/workflows/publish-packages.yml | 46 ++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/publish-packages.yml diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml new file mode 100644 index 000000000..b491e7834 --- /dev/null +++ b/.github/workflows/publish-packages.yml @@ -0,0 +1,46 @@ +name: Publish Messaging Packages +on: workflow_dispatch + +permissions: + id-token: write + contents: read + +jobs: + publish-packages: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.1.0 + - uses: actions/setup-node@v2 + with: + node-version-file: '.nvmrc' + cache: 'yarn' + - name: Install + run: | + yarn --immutable + - name: Build Client + working-directory: ./packages/client + run: | + yarn build + - name: Build Socket + working-directory: ./packages/socket + run: | + yarn build + - name: Build Webchat + working-directory: ./packages/webchat + run: | + yarn build + - name: Publish Client + uses: botpress/gh-actions/publish-if-not-exists@master + with: + path: './packages/client' + token: '${{ secrets.NPM_ACCESS_TOKEN }}' + - name: Publish Socket + uses: botpress/gh-actions/publish-if-not-exists@master + with: + path: './packages/socket' + token: '${{ secrets.NPM_ACCESS_TOKEN }}' + - name: Publish Webchat + uses: botpress/gh-actions/publish-if-not-exists@master + with: + path: './packages/webchat' + token: '${{ secrets.NPM_ACCESS_TOKEN }}'