Skip to content

Commit 6e13b02

Browse files
authored
Add a publish workflow (#2)
Publishes the Gem to RubyGems on the creation of a new release
1 parent a68186a commit 6e13b02

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/publish.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish to RubyGems
2+
on:
3+
release:
4+
types: [created]
5+
6+
jobs:
7+
publish:
8+
name: Publish
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out code
12+
uses: actions/checkout@v2
13+
14+
- name: Setup Ruby
15+
uses: ruby/setup-ruby@v1
16+
with:
17+
ruby-version: 2.7.1
18+
19+
- name: Build Gem
20+
run: gem build -o patch_ruby.gem patch_ruby.gemspec
21+
22+
- name: Push to RubyGems
23+
env:
24+
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
25+
run: gem push patch_ruby.gem
26+

0 commit comments

Comments
 (0)