From 42b640ab945a594c72aff9308cd9769a04a1c581 Mon Sep 17 00:00:00 2001 From: lrangine <19699092+lokeshrangineni@users.noreply.github.com> Date: Mon, 3 Feb 2025 15:56:53 -0500 Subject: [PATCH] Creating/updating the stable branch after the release. Signed-off-by: lrangine <19699092+lokeshrangineni@users.noreply.github.com> --- .github/workflows/release.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e95950cbeb..9abc6f1642e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -156,7 +156,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - persist-credentials: false + persist-credentials: true - name: Setup Node.js uses: actions/setup-node@v3 with: @@ -179,3 +179,11 @@ jobs: if: github.event.inputs.dry_run == 'false' run: | npx -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/exec -p semantic-release semantic-release + + - name: Create or update stable branch after release. + if: github.event.inputs.dry_run == 'false' + run: | + git fetch origin + git checkout -B stable + git reset --hard origin/${GITHUB_REF##*/} + git push -f origin stable \ No newline at end of file