Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

Commit 780e269

Browse files
committed
bypass pr requirement on ci
1 parent 7741f57 commit 780e269

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ jobs:
2020
runs-on: ubuntu-latest
2121
permissions:
2222
contents: write
23+
id-token: write
2324

2425
steps:
2526
- name: Checkout repository
2627
uses: actions/checkout@v4
2728
with:
28-
token: ${{ secrets.GITHUB_TOKEN }}
29+
token: ${{ secrets.PAT_TOKEN }}
2930
fetch-depth: 0
31+
persist-credentials: true
3032

3133
- name: Setup Git
3234
run: |
@@ -96,20 +98,22 @@ jobs:
9698
9799
- name: Commit and push version change
98100
env:
99-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101+
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
100102
run: |
101103
git add build.gradle.kts
102104
git commit -m "[PV-0] chore: bump version to ${{ steps.bump.outputs.new }} [skip ci]"
103-
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
105+
# Configure git to use token for push (needed to bypass branch protection)
106+
git remote set-url origin https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/${{ github.repository }}
104107
git push origin HEAD:main
105108
106109
- name: Create tag
107110
env:
108-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111+
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
109112
run: |
110113
NEW_VERSION="${{ steps.bump.outputs.new }}"
111114
git tag -a "v$NEW_VERSION" -m "Release v$NEW_VERSION"
112-
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
115+
# Configure git to use token for push (needed to bypass branch protection)
116+
git remote set-url origin https://x-access-token:${{ secrets.PAT_TOKEN }}@github.com/${{ github.repository }}
113117
git push origin "v$NEW_VERSION"
114118
115119
- name: Setup Java
@@ -165,7 +169,7 @@ jobs:
165169
166170
- name: Create release
167171
env:
168-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172+
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
169173
run: |
170174
gh release create "v${{ steps.bump.outputs.new }}" \
171175
--title "Release v${{ steps.bump.outputs.new }}" \

0 commit comments

Comments
 (0)