Skip to content

Commit 6f031cf

Browse files
committed
Enhance GitHub Actions workflow for tagging releases by configuring Git to use a token for authentication. This change ensures secure access to the repository when pushing tags during the release process.
1 parent cc9d8c3 commit 6f031cf

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎.github/workflows/tag-release.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ jobs:
219219
run: |
220220
git config --global user.name "github-actions[bot]"
221221
git config --global user.email "github-actions[bot]@users.noreply.github.com"
222+
223+
# Configure git to use the token for authentication
224+
git remote set-url origin https://x-access-token:${{ secrets.ACTIONS_TOKEN }}@github.com/${{ github.repository }}.git
225+
222226
git tag -a "v${{ steps.get-version.outputs.version }}" -m "Release v${{ steps.get-version.outputs.version }}"
223227
git push origin "v${{ steps.get-version.outputs.version }}"
224228

0 commit comments

Comments
 (0)