Skip to content

Commit ef1badb

Browse files
authored
use git config from rubygems/release action (#15)
* reset version after failed auto-release attempts did nothing * use git config from rubygems/release action
1 parent 4a9b3db commit ef1badb

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.github/workflows/tag.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ 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]"
48-
git commit -am "Bump version to ${{ steps.version.outputs.bump }}"
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"
4950
VERSION=$(ruby -e "require './lib/${{ env.GEM_NAME }}/version'; puts ${{ env.GEM_CLASS_NAME }}::VERSION")
51+
git commit -am "Bump version to $VERSION"
5052
git tag "v$VERSION"
5153
git push origin main "v$VERSION"

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
query_packwerk (0.2.2.pre)
4+
query_packwerk (0.1.0)
55
coderay
66
packwerk
77
parse_packwerk

lib/query_packwerk/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# frozen_string_literal: true
33

44
module QueryPackwerk
5-
VERSION = '0.2.2.pre'
5+
VERSION = '0.1.0'
66
end

0 commit comments

Comments
 (0)