Skip to content

Commit

Permalink
Automated CI for publish in Rubygems
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrofurtado committed May 22, 2022
1 parent 7017cdc commit 4a9fe10
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/rubygems.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish to Rubygems

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0

- name: Install dependencies
run: bundle install

- 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}}"
2 changes: 1 addition & 1 deletion erede.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'erede/version'

Gem::Specification.new do |spec|
spec.name = 'erede'
spec.name = 'erede-ruby-sdk'
spec.version = Erede::VERSION
spec.authors = ['Rede']
spec.email = ['[email protected]']
Expand Down

0 comments on commit 4a9fe10

Please sign in to comment.