From bb6b5fc1240b3f642a9887266c3f2f0f55c11f54 Mon Sep 17 00:00:00 2001 From: oat-github-bot Date: Thu, 10 Aug 2023 20:51:44 +0530 Subject: [PATCH] feat: add auto release action and an emergency label will be attached with each intermediate PR during the SemVer release --- .github/workflows/release_tao_extension.yml | 40 +++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/release_tao_extension.yml diff --git a/.github/workflows/release_tao_extension.yml b/.github/workflows/release_tao_extension.yml new file mode 100644 index 0000000..340fda0 --- /dev/null +++ b/.github/workflows/release_tao_extension.yml @@ -0,0 +1,40 @@ +name: Release Tao extension + +on: + workflow_dispatch: + push: + branches: + - develop + +jobs: + auto-release: + if: github.event.pull_request.merged == true + name: Automated Tao extension release + runs-on: ubuntu-latest + + steps: + - name: clone the repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 #avoid unrelated history error + token: ${{ secrets.SEMVER_GH_TOKEN }} #bypass branch protection rule + + - name: Configure git user + #configuring git for runner + run: | + git config --global user.name "oat-github-bot" + git config --global user.email "oat-github-bot@taotesting.com" + + + - name: install and run release tool + env: + GITHUB_TOKEN: ${{ secrets.SEMVER_GH_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + npm config set //registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} + npm i -g + npm i update-notifier + #create tag and release a new version + taoRelease npmRelease --no-interactive + + #Release branch will be different for each repository, make necessary changes. \ No newline at end of file