From 43993e40bfd28d194798bdd910cc1a781de2e951 Mon Sep 17 00:00:00 2001 From: Junior Garcia Date: Fri, 29 Nov 2024 17:06:01 -0300 Subject: [PATCH] fix: pre release workflow on protected branches (#4174) --- .github/workflows/enter-pre-release-mode.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/enter-pre-release-mode.yaml b/.github/workflows/enter-pre-release-mode.yaml index 8fe6bb05c2..00cd9ba4c7 100644 --- a/.github/workflows/enter-pre-release-mode.yaml +++ b/.github/workflows/enter-pre-release-mode.yaml @@ -23,11 +23,24 @@ jobs: run: | git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git config user.name "github-actions[bot]" + if [ ${{ github.ref }} == 'refs/heads/canary' ]; then pnpm changeset:canary else pnpm changeset:beta fi + git add -A git commit -m 'chore(pre-release): enter pre-release mode' - git push \ No newline at end of file + + # Create a new branch and push changes + git checkout -b changeset-branch + git push --set-upstream origin changeset-branch + + - name: Create pull request to canary + uses: peter-evans/create-pull-request@v3 + with: + title: "Pre-release changes for canary" + body: "This PR includes pre-release changes for the canary branch." + base: canary + head: changeset-branch \ No newline at end of file