Skip to content

Commit

Permalink
chore(ci): push to rubygem on release (#2)
Browse files Browse the repository at this point in the history
* chore(ci): push to rubygem on release

* style: format yml

* fix warnings on `gem build ...`

* lt not lte

* muscle memory is not used to double quote
  • Loading branch information
gildesmarais authored Apr 17, 2020
1 parent a9a536d commit 1680aab
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 7 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/gempush.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Ruby Gem

on:
release:
types:
- created

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

steps:
- uses: actions/checkout@v2

- name: Set up Ruby 2.5
uses: actions/setup-ruby@v1
with:
version: 2.5.x

- name: setup bundler, rubocop and rspec
run: |
gem install bundler
bundle config path vendor/bundle
bundle config --global frozen 1
bundle install --jobs 4 --retry 3
bundle exec rubocop --fail-fast
bundle exec rake
- 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}}
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ PLATFORMS
ruby

DEPENDENCIES
bundler
bundler (~> 2.0)
jekyll-loading-lazy!
rake (~> 12.0)
rspec (~> 3.0)
rubocop
rubocop-jekyll
rubocop (< 1.0)
rubocop-jekyll (< 1.0)

BUNDLED WITH
2.1.4
8 changes: 4 additions & 4 deletions jekyll-loading-lazy.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ Gem::Specification.new do |spec|
}
spec.require_paths = %w(lib)
spec.required_ruby_version = ">= 2.5.8"
spec.add_dependency "jekyll", ">= 3.0", "<5.0"
spec.add_dependency "jekyll", ">= 3.0", "< 5.0"
spec.add_dependency "nokogiri", ">= 1.10", "< 2.0"
spec.add_development_dependency "bundler"
spec.add_development_dependency "bundler", "~> 2.0"
spec.add_development_dependency "rake", "~> 12.0"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "rubocop"
spec.add_development_dependency "rubocop-jekyll"
spec.add_development_dependency "rubocop", "< 1.0"
spec.add_development_dependency "rubocop-jekyll", "< 1.0"
end

0 comments on commit 1680aab

Please sign in to comment.