-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from kickstarter/github-releases
GitHub releases
- Loading branch information
Showing
7 changed files
with
122 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Setup RubyGems | ||
description: Setup RubyGems credentials | ||
inputs: | ||
rubygems_api_key: | ||
description: RubyGems API key | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- run: mkdir -p ~/.gem | ||
shell: bash | ||
- run: | | ||
cat <<-YAML > ~/.gem/credentials | ||
--- | ||
:rubygems_api_key: ${{ inputs.rubygems_api_key }} | ||
YAML | ||
shell: bash | ||
- run: chmod 0600 ~/.gem/credentials | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Test | ||
description: Run tests | ||
inputs: | ||
activesupport-version: | ||
description: ActiveSupport version constraint | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- run: bundle add activesupport -v '${{ inputs.activesupport-version }}' | ||
shell: bash | ||
- run: bundle install | ||
shell: bash | ||
- run: bundle exec rake | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Test and Release | ||
on: | ||
pull_request: | ||
push: | ||
release: | ||
types: | ||
- published | ||
jobs: | ||
test: | ||
name: Test [Ruby ${{ matrix.ruby-version }}] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ruby-version: | ||
- "2.7" | ||
- "3.1" | ||
- "3.2" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
- run: bundle install | ||
- run: bundle exec rake test | ||
push: | ||
name: Publish Gem | ||
if: ${{ github.event.release }} | ||
needs: | ||
- test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.2" | ||
- uses: ./.github/actions/setup-rubygems | ||
with: | ||
rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }} | ||
- run: bundle install | ||
- run: bundle exec rake gem:push |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,29 @@ | ||
require "rubygems" | ||
require "bundler/setup" | ||
require "bundler/gem_tasks" | ||
require 'rake/testtask' | ||
|
||
task :default => :test | ||
|
||
Rake::TestTask.new do |t| | ||
t.pattern = "spec/*_spec.rb" | ||
end | ||
|
||
task :default => :test | ||
namespace :gem do | ||
require 'bundler/gem_tasks' | ||
|
||
@gem = "pkg/egads-#{ Egads::VERSION }.gem" | ||
|
||
desc "Push #{ @gem } to rubygems.org" | ||
task :push => %i[test build git:check] do | ||
sh %{gem push #{ @gem }} | ||
end | ||
end | ||
|
||
namespace :git do | ||
desc 'Check git workspace' | ||
task :check do | ||
sh %{git diff HEAD --quiet} do |ok| | ||
abort "\e[31mRefusing to continue - git workspace is dirty\e[0m" unless ok | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# https://taskfile.dev | ||
|
||
version: "3" | ||
|
||
tasks: | ||
init: | ||
desc: Initialize project | ||
cmds: | ||
- bundle install | ||
|
||
test: | ||
desc: Run tests | ||
cmds: | ||
- bundle exec rake test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,29 +2,31 @@ $:.unshift 'lib' | |
require 'egads/version' | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "egads" | ||
s.version = Egads::VERSION | ||
s.summary = "Extensible Git Archive Deploy Strategy" | ||
s.homepage = "https://github.com/kickstarter/egads" | ||
s.email = ["[email protected]"] | ||
s.authors = ["Aaron Suggs"] | ||
s.license = 'MIT' | ||
s.name = "egads" | ||
s.version = Egads::VERSION | ||
s.summary = "Extensible Git Archive Deploy Strategy" | ||
s.homepage = "https://github.com/kickstarter/egads" | ||
s.email = ["[email protected]"] | ||
s.authors = ["Aaron Suggs"] | ||
s.license = 'MIT' | ||
|
||
s.files = `git ls-files`.split($/) | ||
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) } | ||
s.test_files = s.files.grep(%r{^(test|spec|features)/}) | ||
s.require_paths = ["lib"] | ||
|
||
s.extra_rdoc_files = [ "README.md" ] | ||
s.extra_rdoc_files = ["README.md"] | ||
s.rdoc_options = ["--charset=UTF-8"] | ||
|
||
s.add_dependency "aws-sdk-s3", '~> 1.0' | ||
s.add_dependency "rexml" # required for Ruby 3+ | ||
s.add_dependency "thor" | ||
|
||
s.add_development_dependency "rake" | ||
s.add_development_dependency "minitest" | ||
#s.add_development_dependency "simple_mock" # Via http://tatey.com/2012/02/07/mocking-with-minitest-mock-and-simple-delegator/ | ||
|
||
s.description = %s{ | ||
s.description = <<~EOS | ||
A collection of scripts for making a deployable tarball of a git commit, | ||
uploading it to Amazon S3, and downloading it to your servers.} | ||
uploading it to Amazon S3, and downloading it to your servers. | ||
EOS | ||
end |