Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
Create gem-push.yml (#14)
Browse files Browse the repository at this point in the history
* Rename test from travis to test
* No more zero versions and update dependencies
- Release version 1 after more than six years in production.
- Bump sinatra to latest version
- Replace deprecated archive-tar-minitar with minitar (#2)

Co-authored-by: Viktor Rimark <[email protected]>
Co-authored-by: Jonas Palm <[email protected]>
  • Loading branch information
3 people authored Nov 30, 2021
1 parent a7876f9 commit 67e8f5d
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 6 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/gem-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Ruby Gem

on:
push:
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.6
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6.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.GITHUB_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_KEY}}"
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ require "bundler/gem_tasks"
require 'rake'
require 'rspec/core/rake_task'

task :default => :travis
task :travis => [:spec]
task :default => :test
task :test => [:spec]

RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = 'spec/*_spec.rb'
Expand Down
8 changes: 4 additions & 4 deletions talos.gemspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Gem::Specification.new do |s|
s.version = '0.1.12'
s.version = '1.0.0'
s.name = 'talos'
s.authors = ['Alexey Lapitsky', 'Johan Haals']
s.email = '[email protected]'
Expand All @@ -14,11 +14,11 @@ Gem::Specification.new do |s|
s.require_paths = ['lib']

s.add_dependency 'rack', '2.2.3'
s.add_dependency 'sinatra', '~> 2.0.8'
s.add_dependency 'sinatra', '~> 2.1.0'
s.add_dependency 'hiera', '~> 3.6.0'
s.add_dependency 'archive-tar-minitar', '~> 0.5.2'
s.add_dependency 'minitar', '~> 0.9'
s.add_development_dependency 'rake'
s.add_development_dependency 'rack-test', '~> 1.1.0'
s.add_development_dependency 'sinatra-contrib'
s.add_development_dependency 'rspec', '>= 2.9'
s.add_development_dependency 'sinatra-contrib', '~> 2.1.0'
end

0 comments on commit 67e8f5d

Please sign in to comment.