Skip to content

Commit

Permalink
Create gempush.yml to use an action to publish to Github and Ru… (#34)
Browse files Browse the repository at this point in the history
* Create gempush.yml

* Fix action to pin to ruby-version

* Do rubygems first, then GPR

* Test to see how GPR works

* Remove github since our gemspec only allows rubygems, run on new tag
  • Loading branch information
erawk authored Mar 4, 2020
1 parent de30631 commit f8927b1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/gempush.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Ruby Gem

on:
push:
tags:
- v* # Only run when we carve a new tag

jobs:
build:
name: Build + Publish
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Ruby 2.6
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6.x

- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}


1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@

# rspec failure tracking
.rspec_status
bambora-client-*.gem

0 comments on commit f8927b1

Please sign in to comment.