1515 steps :
1616 - name : Checkout repo
1717 uses : actions/checkout@v4
18+ with :
19+ persist-credentials : false
1820
1921 - name : Set up Python
2022 uses : actions/setup-python@v5
@@ -239,6 +241,7 @@ jobs:
239241 uses : actions/checkout@v4
240242 with :
241243 fetch-depth : 0 # Required to access all tags
244+ persist-credentials : false
242245
243246 - name : Get latest semantic tag
244247 id : get_tag
@@ -278,10 +281,11 @@ jobs:
278281 run : |
279282 git config user.name "github-actions[bot]"
280283 git config user.email "github-actions[bot]@users.noreply.github.com"
284+ git remote set-url origin https://x-access-token:${{ secrets.GH_PAT }}@github.com/${{ github.repository }}
281285 git tag ${{ steps.bump_version.outputs.new_tag }}
282286 git push origin ${{ steps.bump_version.outputs.new_tag }}
283287 env :
284- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
288+ GITHUB_TOKEN : ${{ secrets.GH_PAT }}
285289
286290 tag-open-pr :
287291 name : Tag Open Pull Request (Non-Semantic)
@@ -303,10 +307,11 @@ jobs:
303307
304308 git config user.name "github-actions[bot]"
305309 git config user.email "github-actions[bot]@users.noreply.github.com"
310+ git remote set-url origin https://x-access-token:${{ secrets.GH_PAT }}@github.com/${{ github.repository }}
306311 git tag "$TAG"
307312 git push origin "$TAG"
308313 env :
309- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
314+ GITHUB_TOKEN : ${{ secrets.GH_PAT }}
310315
311316 cleanup :
312317 name : Delete Merged PR Tags
0 commit comments