Skip to content

Commit

Permalink
ci(release): enable force push to protected release branches (#3309)
Browse files Browse the repository at this point in the history
* ci(release): use secret to check out

So that release workflow can push/force push to protected branches

* ci(release): force push release version commit

So we can bypass protected branch rules

(cherry picked from commit 4aa01d6)
  • Loading branch information
ev-codes committed Sep 25, 2024
1 parent 93db083 commit 86f80fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/RELEASE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PROTECTED_BRANCH_PAT }}
ref: ${{ github.event.release.target_commitish }}
fetch-depth: 0

Expand Down Expand Up @@ -247,7 +248,7 @@ jobs:
- name: Commit and tag
run: |
git commit -am "ci: release version ${RELEASE_VERSION}"
git push origin ${RELEASE_BRANCH}
git push --force origin ${RELEASE_BRANCH}
git tag -fa ${RELEASE_VERSION} -m "ci: release version ${RELEASE_VERSION}"
git push --force origin ${RELEASE_VERSION}
Expand Down

0 comments on commit 86f80fe

Please sign in to comment.