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 }}'