diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e95950cbe..bfb5e382f7 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,12 @@ 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: Updating `stable` branch after release. + if: github.event.inputs.dry_run == 'false' + run: | + git fetch origin + # note that this checkout creates a branch called `stable` if it does not exist + git checkout -B stable + git reset --hard origin/${GITHUB_REF##*/} + git push -f origin stable \ No newline at end of file