From ef9170dcb664705270c6859de16d92ea7c8071b7 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Mon, 16 Jan 2023 13:33:57 +0100 Subject: [PATCH] :construction_worker: Add js and react lib auto publish actions Closes #254 --- .github/workflows/auto-create-tags.yml | 12 +++++++++++ .github/workflows/publish-typebot-js.yml | 23 +++++++++++++++++++++ .github/workflows/publish-typebot-react.yml | 23 +++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 .github/workflows/publish-typebot-js.yml create mode 100644 .github/workflows/publish-typebot-react.yml diff --git a/.github/workflows/auto-create-tags.yml b/.github/workflows/auto-create-tags.yml index f1ea82c7a1..1b8d7ea7c9 100644 --- a/.github/workflows/auto-create-tags.yml +++ b/.github/workflows/auto-create-tags.yml @@ -27,3 +27,15 @@ jobs: with: package_root: '/packages/typebot-js' tag_prefix: 'js-lib-v' + + - name: 'Create typebot-js tag' + uses: Klemensas/action-autotag@stable + with: + package_root: '/packages/js' + tag_prefix: 'js-v' + + - name: 'Create typebot-js tag' + uses: Klemensas/action-autotag@stable + with: + package_root: '/packages/react' + tag_prefix: 'react-v' diff --git a/.github/workflows/publish-typebot-js.yml b/.github/workflows/publish-typebot-js.yml new file mode 100644 index 0000000000..d6f8fc9b6c --- /dev/null +++ b/.github/workflows/publish-typebot-js.yml @@ -0,0 +1,23 @@ +name: Publish @typebot.io/js package to NPM + +on: + push: + tags: + - 'js-v*' + +jobs: + publish: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./packages/js + steps: + - uses: actions/checkout@v2 + - uses: pnpm/action-setup@v2.2.2 + - run: pnpm i --frozen-lockfile + - run: pnpm build + - uses: JS-DevTools/npm-publish@v1 + with: + package: './packages/js/package.json' + token: ${{ secrets.NPM_TOKEN }} + access: public diff --git a/.github/workflows/publish-typebot-react.yml b/.github/workflows/publish-typebot-react.yml new file mode 100644 index 0000000000..35328c15b7 --- /dev/null +++ b/.github/workflows/publish-typebot-react.yml @@ -0,0 +1,23 @@ +name: Publish @typebot.io/react package to NPM + +on: + push: + tags: + - 'react-v*' + +jobs: + publish: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./packages/js + steps: + - uses: actions/checkout@v2 + - uses: pnpm/action-setup@v2.2.2 + - run: pnpm i --frozen-lockfile + - run: pnpm build + - uses: JS-DevTools/npm-publish@v1 + with: + package: './packages/js/package.json' + token: ${{ secrets.NPM_TOKEN }} + access: public