Skip to content

Commit a52271f

Browse files
authored
Merge pull request #146 from square/fern-support/publish
Add publish.yml workflow
2 parents 666e7b9 + 5459162 commit a52271f

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish
2+
3+
on: [push]
4+
5+
jobs:
6+
publish:
7+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout repo
11+
uses: actions/checkout@v3
12+
13+
- uses: ruby/setup-ruby@v1
14+
with:
15+
ruby-version: 2.7
16+
bundler-cache: true
17+
18+
- name: Test gem
19+
run: bundle install && bundle exec rake test
20+
21+
- name: Build and Push Gem
22+
env:
23+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
24+
run: |
25+
gem build square.gemspec
26+
27+
gem push square-*.gem --host https://rubygems.org/

0 commit comments

Comments
 (0)