Skip to content

Commit 1df0d7d

Browse files
committed
chore: Update release.yml and push changes to protected branch
1 parent 220d4bd commit 1df0d7d

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,23 @@ jobs:
109109
env:
110110
REF: ${{ github.ref }}
111111

112+
- name: Push to unprotected branch
113+
if: inputs.is_branch_protected == 'false'
114+
shell: bash
115+
run: |
116+
git push --follow-tags
117+
env:
118+
REF: ${{ github.ref }}
119+
120+
- name: Push to protected branch
121+
if: inputs.is_branch_protected == 'true'
122+
uses: CasperWA/push-protected@v2
123+
with:
124+
token: ${{ secrets.GITHUB_TOKEN }}
125+
branch: main
126+
unprotect_reviews: true
127+
tags: true
128+
112129
- name: Publish release
113130
uses: ncipollo/release-action@v1
114131
with:
@@ -127,6 +144,6 @@ jobs:
127144
repo_token: ${{ secrets.GITHUB_TOKEN }}
128145
file: sesame-daemon-linux
129146
asset_name: sesame-daemon-linux
130-
tag: ${{ env.PACKAGE_VERSION }}
147+
tag: ${{ env.NEW_VERSION }}
131148
overwrite: true
132149
body: "This is my release text"

0 commit comments

Comments
 (0)