Skip to content

Commit

Permalink
Drop unsupported rubies
Browse files Browse the repository at this point in the history
  • Loading branch information
tcrouch committed Apr 7, 2024
1 parent 88fa4f6 commit 666dcd1
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 44 deletions.
54 changes: 27 additions & 27 deletions .github/workflows/gem-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Ruby Gem

on:
push:
tags: [ 'v*.*.*' ]
tags: ["v*.*.*"]

jobs:
build:
Expand All @@ -13,31 +13,31 @@ jobs:
packages: write

steps:
- uses: actions/checkout@v2
- name: Set up Ruby 2.7
uses: actions/setup-ruby@v1
with:
ruby-version: 2.7.x
- uses: actions/checkout@v2
- name: Set up Ruby 3.1
uses: actions/setup-ruby@v1
with:
ruby-version: 3.1.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 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_AUTH_TOKEN}}"
- 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}}"
29 changes: 14 additions & 15 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,31 @@ name: Ruby
on:
push:
pull_request:
branches: [ main ]
branches: [main]

jobs:
test:

runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ["2.7", "3.0", "3.1", "3.2", "3.3"]
ruby-version: ["3.1", "3.2", "3.3"]
allow-failure: [false]
include:
- ruby-version: "ruby-head"
allow-failure: true
continue-on-error: ${{ matrix.allow-failure }}

steps:
- name: Checkout 🛎
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run tests
run: bundle exec rake
- name: Run codacy-coverage-reporter 📈
uses: codacy/codacy-coverage-reporter-action@v1
with:
- name: Checkout 🛎
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run tests
run: bundle exec rake
- name: Run codacy-coverage-reporter 📈
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
3 changes: 2 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
AllCops:
TargetRubyVersion: 2.7
TargetRubyVersion: 3.1
NewCops: enable
Metrics/AbcSize:
Enabled: false
Metrics/CyclomaticComplexity:
Expand Down
2 changes: 1 addition & 1 deletion edits.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.required_ruby_version = ">= 2.7"
spec.required_ruby_version = ">= 3.1"

spec.add_development_dependency "benchmark-ips", "~> 2.8"
spec.add_development_dependency "bundler", "~> 2.0"
Expand Down

0 comments on commit 666dcd1

Please sign in to comment.