Skip to content

Commit 9c90646

Browse files
committed
Extract release-gem and don't use bundle exec
1 parent d2e29b2 commit 9c90646

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

.github/workflows/push_gem.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,28 @@ jobs:
3535
bundler-cache: true
3636
ruby-version: ruby
3737

38-
- name: Publish to RubyGems
39-
uses: rubygems/release-gem@9e85cb11501bebc2ae661c1500176316d3987059 # v1.1.0
38+
- name: Set remote URL
39+
run: |
40+
# Attribute commits to the last committer on HEAD
41+
git config --global user.email "$(git log -1 --pretty=format:'%ae')"
42+
git config --global user.name "$(git log -1 --pretty=format:'%an')"
43+
git remote set-url origin "https://x-access-token:${{ github.token }}@github.com/$GITHUB_REPOSITORY"
44+
shell: bash
45+
46+
- name: Configure trusted publishing credentials
47+
uses: rubygems/configure-rubygems-credentials@v1.0.0
48+
49+
- name: Install dependencies
50+
run: gem install rake-compiler
51+
shell: bash
52+
53+
- name: Run release rake task
54+
run: rake release
55+
shell: bash
56+
57+
- name: Wait for release to propagate
58+
run: gem exec rubygems-await pkg/*.gem
59+
shell: bash
4060

4161
- name: Create GitHub release
4262
run: |

0 commit comments

Comments
 (0)