Skip to content

Commit dc33f47

Browse files
chore: release pipeline hardening (#73)
Signed-off-by: Christian Kreuzberger <[email protected]>
1 parent f35a626 commit dc33f47

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
run: |
5757
echo "🚀 Creating release package now..."
5858
# this will generate a commit and a tag
59-
npx standard-version@^9.3.1 --sign
59+
npx standard-version@^9.3.1
6060
6161
echo "::set-output name=tag-name::$(git describe --tags --abbrev=0)"
6262
@@ -68,10 +68,14 @@ jobs:
6868
run: |
6969
echo "Fetching previously deleted old tags..."
7070
git fetch origin --tags -f
71-
# check out a temporary branch
72-
git checkout -b patch/release-notes-$RELEASE_TAG
71+
TARGET_BRANCH=patch/release-notes-$RELEASE_TAG
72+
# delete existing branch just in case
73+
git branch -D $TARGET_BRANCH &>/dev/null || true
74+
# create new branch
75+
git checkout -b $TARGET_BRANCH
76+
# push changes
7377
echo "⚡️ Pushing changes to remote repository..."
74-
git push --follow-tags --set-upstream origin patch/release-notes-$RELEASE_TAG
78+
git push -f --follow-tags --set-upstream origin patch/release-notes-$RELEASE_TAG
7579
7680
7781
- name: Create GitHub Pull Request for release notes

0 commit comments

Comments
 (0)