From 25adcfe049f2b6c61085dc9eeae0e866d423acf7 Mon Sep 17 00:00:00 2001 From: Jim Blanchard Date: Mon, 18 Mar 2024 11:40:31 -0500 Subject: [PATCH] chore: Refactor release workflow to allow workflow execution on generated PRs (#13095) --- .github/workflows/callable-npm-publish-release.yml | 2 +- .github/workflows/push-latest-release.yml | 2 ++ package.json | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/callable-npm-publish-release.yml b/.github/workflows/callable-npm-publish-release.yml index 0b88f695d23..5468cb0f5a6 100644 --- a/.github/workflows/callable-npm-publish-release.yml +++ b/.github/workflows/callable-npm-publish-release.yml @@ -57,7 +57,7 @@ jobs: run: | yarn run docs git add ./docs/api/ - git commit -m "chore(release): update API docs [ci skip]" + git commit -m "chore(release): update API docs [skip release]" - name: Push post release changes to the release branch working-directory: ./amplify-js diff --git a/.github/workflows/push-latest-release.yml b/.github/workflows/push-latest-release.yml index 3b531e9c23c..c761d4de02f 100644 --- a/.github/workflows/push-latest-release.yml +++ b/.github/workflows/push-latest-release.yml @@ -12,6 +12,8 @@ on: jobs: e2e: + # Skip the release workflow if the head commit in the triggering branch contains [skip release] + if: ${{ !contains(github.event.head_commit.message, '[skip release]') }} secrets: inherit uses: ./.github/workflows/callable-release-verification.yml release: diff --git a/package.json b/package.json index bff942dd70b..e65fe07e244 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "unlink-all": "lerna exec --no-bail --parallel -- yarn unlink; exit 0", "publish:preid": "./scripts/preid-env-vars-exist.sh && lerna publish --canary --force-publish --dist-tag=${PREID_PREFIX} --preid=${PREID_PREFIX}${PREID_HASH_SUFFIX} --yes", "publish:main": "lerna publish --canary --force-publish --dist-tag=unstable --preid=unstable${PREID_HASH_SUFFIX} --yes", - "publish:release": "lerna publish --conventional-commits --message 'chore(release): Publish [ci skip]' --yes", + "publish:release": "lerna publish --conventional-commits --message 'chore(release): Publish [skip release]' --yes", "publish:v5-stable": "lerna publish --conventional-commits --yes --dist-tag=stable-5 --message 'chore(release): Publish [ci skip]' --no-verify-access", "publish:verdaccio": "lerna publish --canary --force-publish --no-push --dist-tag=unstable --preid=unstable --yes", "ts-coverage": "lerna run ts-coverage",