Skip to content

Commit

Permalink
chore: add GH workflow to push to registry (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
saiqulhaq authored Nov 6, 2021
1 parent ee9dfe3 commit 9eea131
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 14 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/gem-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Push to Rubygems

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
name: Build + Publish
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

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

- name: Publish to GPR
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
env:
GEM_HOST_API_KEY: "Bearer ${{secrets.GPR_TOKEN}}"
OWNER: ${{ github.repository_owner }}

- 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}}"
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ PLATFORMS
ruby

DEPENDENCIES
bundle-audit
bundle-audit (~> 0.1.0)
bundler (>= 2.2.30)
case_transform2!
guard
guard-rspec
pry
rake
guard (~> 2.18.0)
guard-rspec (~> 4.7.3)
pry (~> 0.14.1)
rake (>= 13.0.6)
rspec (~> 3.7.0)
rubocop (~> 1.22)
rubocop-rspec
rubocop-rspec (~> 2.5.0)
simplecov (~> 0.17.1)

BUNDLED WITH
Expand Down
14 changes: 7 additions & 7 deletions case_transform2.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |s|
s.license = 'MIT'
s.authors = ['L. Preston Sego III', 'Ben Mills', 'Saiqul Haq']
s.email = '[email protected]'
s.homepage = 'https://github.com/saiqulhaq/case_transform'
s.homepage = 'https://github.com/saiqulhaq/case_transform2'
s.summary = 'Transforms string letter case to camel, snake,' \
'dash and underscore without activesupport dependencies'
s.description = "#{s.summary}. Forked from https://github.com/rails-api/case_transform"
Expand All @@ -26,14 +26,14 @@ Gem::Specification.new do |s|

s.test_files = s.files.grep(%r{^(test|spec|features)/})

s.add_development_dependency 'bundle-audit'
s.add_development_dependency 'bundle-audit', '~> 0.1.0'
s.add_development_dependency 'bundler', '>= 2.2.30'
s.add_development_dependency 'guard'
s.add_development_dependency 'guard-rspec'
s.add_development_dependency 'pry'
s.add_development_dependency 'rake'
s.add_development_dependency 'guard', '~> 2.18.0'
s.add_development_dependency 'guard-rspec', '~> 4.7.3'
s.add_development_dependency 'pry', '~> 0.14.1'
s.add_development_dependency 'rake', '>= 13.0.6'
s.add_development_dependency 'rspec', '~> 3.7.0'
s.add_development_dependency 'rubocop', '~> 1.22'
s.add_development_dependency 'rubocop-rspec'
s.add_development_dependency 'rubocop-rspec', '~> 2.5.0'
s.add_development_dependency 'simplecov', '~> 0.17.1'
end
2 changes: 1 addition & 1 deletion lib/case_transform2/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module CaseTransform2
VERSION = '1.1.0'
VERSION = '1.1.1'
end

0 comments on commit 9eea131

Please sign in to comment.