From ec5e5ac1033e8213d59b1084befa04aaadeeb912 Mon Sep 17 00:00:00 2001 From: Mo Date: Thu, 16 Jun 2022 14:34:44 -0500 Subject: [PATCH] chore(workflow): handle graduate fallback release --- .github/workflows/version-bump.yml | 11 +++++++++-- package.json | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index 8091540f8..61fb25533 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -49,9 +49,16 @@ jobs: git add . (git commit -m 'chore(release): components') || true - - name: Bump Prod Version + - name: Bump Prod Version Graduate + id: graduateRelease if: ${{ github.ref == 'refs/heads/main' }} - run: yarn release:prod + run: yarn release:prod:graduate + - name: Bump Prod Version Fallback + if: ${{ always() && github.ref == 'refs/heads/main' && steps.graduateRelease.outcome == 'failure' }} + run: | + echo Falling back to non-graduate release due to https://github.com/lerna/lerna/issues/2532 + yarn release:prod + - name: Bump Beta Version if: ${{ github.ref == 'refs/heads/develop' }} run: yarn release:beta diff --git a/package.json b/package.json index 43de137a8..86bd91e30 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "start:server:web:localhost": "lerna run start:no-binding --scope=@standardnotes/web-server", "prepare": "husky install", "reset": "find . -type dir -name node_modules | xargs rm -rf && rm -rf yarn.lock && yarn install", - "release:prod": "lerna version --conventional-graduate --conventional-commits --yes -m \"chore(release): publish\"", + "release:prod": "lerna version --conventional-commits --yes -m \"chore(release): publish\"", + "release:prod:graduate": "lerna version --conventional-graduate --conventional-commits --yes -m \"chore(release): publish\"", "release:beta": "lerna version --conventional-prerelease --conventional-commits --yes -m \"chore(release): publish\"", "version": "yarn install --no-immutable && git add yarn.lock", "postversion": "./scripts/push-tags-one-by-one.sh",