Skip to content

Commit e9b53cc

Browse files
feat: Creating/updating the stable branch after the release. (#5003)
* Creating/updating the stable branch after the release. Signed-off-by: lrangine <19699092+lokeshrangineni@users.noreply.github.com> * Update .github/workflows/release.yml Co-authored-by: Francisco Arceo <farceo@redhat.com> Signed-off-by: lrangine <19699092+lokeshrangineni@users.noreply.github.com> * Update .github/workflows/release.yml Co-authored-by: Francisco Arceo <farceo@redhat.com> Signed-off-by: lrangine <19699092+lokeshrangineni@users.noreply.github.com> --------- Signed-off-by: lrangine <19699092+lokeshrangineni@users.noreply.github.com> Co-authored-by: Francisco Arceo <farceo@redhat.com>
1 parent c9aca2d commit e9b53cc

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ jobs:
156156
- name: Checkout
157157
uses: actions/checkout@v4
158158
with:
159-
persist-credentials: false
159+
persist-credentials: true
160160
- name: Setup Node.js
161161
uses: actions/setup-node@v3
162162
with:
@@ -179,3 +179,12 @@ jobs:
179179
if: github.event.inputs.dry_run == 'false'
180180
run: |
181181
npx -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/exec -p semantic-release semantic-release
182+
183+
- name: Updating `stable` branch after release.
184+
if: github.event.inputs.dry_run == 'false'
185+
run: |
186+
git fetch origin
187+
# note that this checkout creates a branch called `stable` if it does not exist
188+
git checkout -B stable
189+
git reset --hard origin/${GITHUB_REF##*/}
190+
git push -f origin stable

0 commit comments

Comments
 (0)