Skip to content

Commit 0b03551

Browse files
committed
use git config from rubygems/release action
1 parent d5a12d8 commit 0b03551

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/tag.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ jobs:
4343
4444
- name: Commit and tag version bump
4545
run: |
46-
git config user.name "github-actions"
47-
git config user.email "[email protected]"
46+
# Attribute commits to the last committer on HEAD
47+
git config --global user.email "$(git log -1 --pretty=format:'%ae')"
48+
git config --global user.name "$(git log -1 --pretty=format:'%an')"
49+
git remote set-url origin "https://x-access-token:${{ github.token }}@github.com/$GITHUB_REPOSITORY"
4850
VERSION=$(ruby -e "require './lib/${{ env.GEM_NAME }}/version'; puts ${{ env.GEM_CLASS_NAME }}::VERSION")
4951
git commit -am "Bump version to $VERSION"
5052
git tag "v$VERSION"

0 commit comments

Comments
 (0)