Skip to content

Commit

Permalink
Ruby 2.7 minimal target version requirement (#13)
Browse files Browse the repository at this point in the history
* Ruby 2.7 minimal target version requirement (metanorma/metanorma#264)
* Update GHA actions due to deprecation warnings
  • Loading branch information
maxirmx authored Oct 26, 2022
1 parent f0c1e52 commit e539133
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: ruby/setup-ruby@v1
- uses: ruby/setup-ruby@master
with:
ruby-version: ${{ matrix.ruby }}
bundler: ${{ env.BUNDLER_VER }}
Expand All @@ -44,9 +44,9 @@ jobs:
name: Package native extensions (linux-gnu, windows, macos)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3

- uses: ruby/setup-ruby@v1
- uses: ruby/setup-ruby@master
with:
ruby-version: 3.1
bundler: ${{ env.BUNDLER_VER }}
Expand All @@ -57,7 +57,7 @@ jobs:

- run: bundle exec rake gem:parallel

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: pkg
path: pkg/*.gem
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
bundle install
bundle exec rake native gem
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: pkg
path: pkg/*.gem
Expand Down Expand Up @@ -116,20 +116,20 @@ jobs:
- name: Build native extension
run: bundle exec rake native gem

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: pkg
path: pkg/*.gem

release:
name: Release gem
runs-on: ubuntu-latest
if: contains(github.ref, 'refs/tags/v')
# if: contains(github.ref, 'refs/tags/v')
needs: [test, package-rake-compiler-dock, package-linux-musl-x86_64, package-linux-musl-aarch64]
steps:
- uses: actions/checkout@v3

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: pkg
path: pkg
Expand Down
9 changes: 8 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@ inherit_from:
- 'https://raw.githubusercontent.com/fontist/oss-guides/master/ci/rubocop.yml'

AllCops:
SuggestExtensions: false
TargetRubyVersion: 2.7
SuggestExtensions: false
Exclude:
- 'tmp/**/*'
- 'vendor/**/*'

Gemspec/RequireMFA:
Enabled: false
4 changes: 0 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ ext_thru_rc_dock = %w[x86_64-linux aarch64-linux] +

ext_thru_musl_cc = %w[x86_64-linux-musl aarch64-linux-musl]

# add your default gem packing task
Gem::PackageTask.new(spec) do |pkg|
end

# HACK: Prevent rake-compiler from overriding required_ruby_version,
# because the shared library here is Ruby-agnostic.
# See https://github.com/rake-compiler/rake-compiler/issues/153
Expand Down
4 changes: 2 additions & 2 deletions extract_ttc.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ Gem::Specification.new do |spec|
spec.description = "Extract font collection to separate font files"
spec.homepage = "https://github.com/fontist/extract_ttc"
spec.license = "BSD-3-Clause"
spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://github.com/fontist/extract_ttc"
spec.metadata["changelog_uri"] = "https://github.com/fontist/extract_ttc"

spec.files = Dir.chdir(__dir__) do
`git ls-files -z`
.split("\x0").reject { |f| f.match(%r{^(.github|test|spec|features)/}) }
.split("\x0").reject { |f| f.match(%r{^(bin|.github|test|spec|features)/}) }
end

spec.bindir = "exe"
Expand Down
2 changes: 1 addition & 1 deletion lib/extract_ttc/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ExtractTtc
VERSION = "0.3.1".freeze
VERSION = "0.3.2".freeze
end

0 comments on commit e539133

Please sign in to comment.