diff --git a/.github/workflows/canary-main.yml b/.github/workflows/canary-main.yml index 1282ef9c..6a3a1343 100644 --- a/.github/workflows/canary-main.yml +++ b/.github/workflows/canary-main.yml @@ -23,6 +23,21 @@ jobs: name: Canary publish (tests + publish next) runs-on: ubuntu-latest steps: + - name: Check for [skip] in PR title + if: contains(github.event.pull_request.title, '[skip]') + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const prNumber = context.payload.pull_request.number; + const body = 'Workflow aborted due to [skip] in the PR title.'; + await github.rest.issues.createComment({ + issue_number: prNumber, + owner: context.repo.owner, + repo: context.repo.repo, + body, + }); + core.setFailed('Workflow aborted due to [skip] in the PR title.'); - name: Checkout uses: actions/checkout@v3 with: diff --git a/.github/workflows/minor-release-latest.yml b/.github/workflows/minor-release-latest.yml index 39bd9518..e4e3444d 100644 --- a/.github/workflows/minor-release-latest.yml +++ b/.github/workflows/minor-release-latest.yml @@ -41,20 +41,24 @@ jobs: run: yarn install --frozen-lockfile - name: Build libs run: yarn build:libs - - name: Minor version & publish - id: minor + - name: Increment ephemeral version run: | - yarn publish:minor - VERSION=$(node -p 'require("./lerna.json").version') - echo "CURRENT_VERSION=$VERSION" >> $GITHUB_ENV - echo "PREVIOUS_TAG=$(git describe --tags --abbrev=0 --exclude $VERSION 2>/dev/null || echo '')" >> $GITHUB_ENV + npx lerna version patch --yes --no-push + - name: Publish NPM + run: yarn publish:from-package env: - GITHUB_TOKEN: ${{ secrets.IQ_ADM_TIM_TOKEN }} - - name: Merge latest into main + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Revert ephemeral commit + run: | + git reset --hard HEAD~1 + - name: Create branch and PR to main run: | - git checkout main - git pull origin main - git merge latest - git push origin main + BRANCH_NAME="update-patch-$(date +%s)" + git checkout -b $BRANCH_NAME + npx lerna version patch --yes --no-push + git add . + git commit -m "chore: bump patch version" + git push origin $BRANCH_NAME + gh pr create --title "[skip] chore: bump patch version" --body "This PR bumps the patch version." --base main --head $BRANCH_NAME env: GITHUB_TOKEN: ${{ secrets.IQ_ADM_TIM_TOKEN }} diff --git a/.github/workflows/patch-release-main.yml b/.github/workflows/patch-release-main.yml index 0c23de6a..0d4accfa 100644 --- a/.github/workflows/patch-release-main.yml +++ b/.github/workflows/patch-release-main.yml @@ -17,6 +17,21 @@ jobs: runs-on: ubuntu-latest name: Patch publish steps: + - name: Check for [skip] in PR title + if: contains(github.event.pull_request.title, '[skip]') + uses: actions/github-script@v6 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const prNumber = context.payload.pull_request.number; + const body = 'Workflow aborted due to [skip] in the PR title.'; + await github.rest.issues.createComment({ + issue_number: prNumber, + owner: context.repo.owner, + repo: context.repo.repo, + body, + }); + core.setFailed('Workflow aborted due to [skip] in the PR title.'); - name: Checkout uses: actions/checkout@v3 with: @@ -41,7 +56,6 @@ jobs: - name: Build libs run: yarn build:libs - name: Publish NPM - run: yarn publish:patch + run: yarn publish:from-package env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - GITHUB_TOKEN: ${{ secrets.IQ_ADM_TIM_TOKEN }} diff --git a/lerna.json b/lerna.json index 69641ee3..c56a6cd4 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,8 @@ { - "packages": ["packages/*"], - "version": "0.10.2", + "packages": [ + "packages/*" + ], + "version": "0.10.3", "npmClient": "yarn", "command": { "publish": { @@ -17,4 +19,4 @@ "message": "chore(release): publish %s" } } -} +} \ No newline at end of file diff --git a/packages/atlas-theme/package.json b/packages/atlas-theme/package.json index 3b43c063..17d90700 100644 --- a/packages/atlas-theme/package.json +++ b/packages/atlas-theme/package.json @@ -1,6 +1,6 @@ { "name": "@iq-firebolt/atlas-theme", - "version": "0.9.9", + "version": "0.10.3", "description": "> ATLAS Theme", "author": "iq team", "homepage": "https://github.com/IQ-tech/firebolt#readme", diff --git a/packages/aurora-theme/package.json b/packages/aurora-theme/package.json index f6265b64..8a226ed1 100644 --- a/packages/aurora-theme/package.json +++ b/packages/aurora-theme/package.json @@ -1,6 +1,6 @@ { "name": "@iq-firebolt/aurora-theme", - "version": "0.10.2", + "version": "0.10.3", "description": "> AURORA Theme", "author": "iq team", "homepage": "https://github.com/IQ-tech/firebolt#readme", diff --git a/packages/blueberry/package.json b/packages/blueberry/package.json index e37ad001..d4f6a3ad 100644 --- a/packages/blueberry/package.json +++ b/packages/blueberry/package.json @@ -1,6 +1,6 @@ { "name": "@iq-firebolt/blueberry-theme", - "version": "0.10.2", + "version": "0.10.3", "description": "> TODO: description", "author": "iq team", "homepage": "https://github.com/IQ-tech/firebolt#readme", diff --git a/packages/br-addons/package.json b/packages/br-addons/package.json index aff36ae5..a25179a1 100644 --- a/packages/br-addons/package.json +++ b/packages/br-addons/package.json @@ -1,6 +1,6 @@ { "name": "@iq-firebolt/br-addons", - "version": "0.10.2", + "version": "0.10.3", "description": "> TODO: description", "author": "iq team", "homepage": "https://github.com/IQ-tech/firebolt#readme", diff --git a/packages/client-core/package.json b/packages/client-core/package.json index 63952366..1752db98 100644 --- a/packages/client-core/package.json +++ b/packages/client-core/package.json @@ -1,6 +1,6 @@ { "name": "@iq-firebolt/client-core", - "version": "0.10.2", + "version": "0.10.3", "description": "> TODO: description", "author": "iq team", "homepage": "https://github.com/IQ-tech/firebolt#readme", diff --git a/packages/client/package.json b/packages/client/package.json index 406b3eca..29f55e4b 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@iq-firebolt/client", - "version": "0.10.2", + "version": "0.10.3", "description": "> TODO: description", "author": "iq team", "homepage": "https://github.com/IQ-tech/firebolt#readme", diff --git a/packages/entities/package.json b/packages/entities/package.json index 2d1b3bac..8442ae91 100644 --- a/packages/entities/package.json +++ b/packages/entities/package.json @@ -1,6 +1,6 @@ { "name": "@iq-firebolt/entities", - "version": "0.10.2", + "version": "0.10.3", "description": "> TODO: description", "author": "iq team", "private": true, diff --git a/packages/json-schema/package.json b/packages/json-schema/package.json index 12d7cf4b..b50bca8c 100644 --- a/packages/json-schema/package.json +++ b/packages/json-schema/package.json @@ -1,6 +1,6 @@ { "name": "@iq-firebolt/json-schema", - "version": "0.10.2", + "version": "0.10.3", "description": "json schema lib", "author": "iq team", "homepage": "https://github.com/IQ-tech/firebolt#readme", diff --git a/packages/lab/package.json b/packages/lab/package.json index 744a4bef..5a5c8b4d 100644 --- a/packages/lab/package.json +++ b/packages/lab/package.json @@ -1,6 +1,6 @@ { "name": "@iq-firebolt/lab", - "version": "0.10.2", + "version": "0.10.3", "private": true, "license": "Apache-2.0", "dependencies": { diff --git a/packages/material-theme/package.json b/packages/material-theme/package.json index 369936b6..7dc23bda 100644 --- a/packages/material-theme/package.json +++ b/packages/material-theme/package.json @@ -1,6 +1,6 @@ { "name": "@iq-firebolt/material-theme", - "version": "0.10.2", + "version": "0.10.3", "description": "> TODO: description", "author": "iq team", "homepage": "https://github.com/IQ-tech/firebolt#readme", diff --git a/packages/validators/package.json b/packages/validators/package.json index 9644034e..ff81cdeb 100644 --- a/packages/validators/package.json +++ b/packages/validators/package.json @@ -1,6 +1,6 @@ { "name": "@iq-firebolt/validators", - "version": "0.10.2", + "version": "0.10.3", "description": "> TODO: description", "author": "iq team", "homepage": "https://github.com/IQ-tech/firebolt#readme",