diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..29e4c10 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Continuous Delivery + +on: + release: + types: [published] + +jobs: + build-package-and-publish-release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: "18" + registry-url: "https://registry.npmjs.org" + - name: Bump version to release + run: sed -i "s/v0.0.0/$RELEASE_VERSION/" ./package.json + env: + RELEASE_VERSION: ${{ github.ref_name }} + working-directory: ./react/human-task-material-renderers + - name: Install dependencies required to build package + run: yarn install + working-directory: ./react/human-task-material-renderers + - name: Build package + run: yarn build + working-directory: ./react/human-task-material-renderers + - name: Publish package + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + working-directory: ./react/human-task-material-renderers diff --git a/react/human-task-material-renderers/package.json b/react/human-task-material-renderers/package.json index 745144e..9ffb698 100644 --- a/react/human-task-material-renderers/package.json +++ b/react/human-task-material-renderers/package.json @@ -1,6 +1,6 @@ { "name": "@io-orkes/human-task-material-renderers-react", - "version": "1.0.1", + "version": "v0.0.0", "private": false, "license": "Apache-2.0", "homepage": "https://orkes.io",