Skip to content

Commit 075811e

Browse files
committed
feat: configure git for token authentication in release workflow
- Set git user configuration for GitHub Actions bot. - Update remote URL to use token authentication for pushing tags.
1 parent 8d6e401 commit 075811e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,13 @@ jobs:
268268
# Create and push tag if this was a manual trigger (not already a tag)
269269
if [[ "$GITHUB_REF" != refs/tags/* ]]; then
270270
echo "Creating and pushing tag: $VERSION"
271+
272+
# Configure git with token authentication
271273
git config user.name "github-actions[bot]"
272274
git config user.email "github-actions[bot]@users.noreply.github.com"
275+
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git"
276+
277+
# Create and push tag
273278
git tag -a "$VERSION" -m "Release $VERSION"
274279
git push origin "$VERSION"
275280
fi

0 commit comments

Comments
 (0)