diff --git a/.github/workflows/publish-gem.yml b/.github/workflows/publish-gem.yml new file mode 100644 index 00000000..9ece656d --- /dev/null +++ b/.github/workflows/publish-gem.yml @@ -0,0 +1,22 @@ +name: Publish Gem + +on: + release: + types: [released] + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.3" + - name: Build gem + run: | + gem build github-pages.gemspec + - name: Publish + run: | + gem push github-pages.gem --key ${{ secrets.PAGES_GEM_PUBLISH }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 8ebfb0cb..ffb1ee7f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -7,8 +7,8 @@ jobs: strategy: matrix: ruby: - - 2.6 - - 2.7 + - '3.0' + - '3.3' steps: - uses: actions/checkout@v4 - name: script/cibuild-docker diff --git a/.rubocop.yml b/.rubocop.yml index fbcea5f9..9cbf940c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -23,7 +23,7 @@ require: - rubocop-performance AllCops: - TargetRubyVersion: 2.5 + TargetRubyVersion: 3.0 Exclude: - 'bin/**/*' - 'script/**/*' diff --git a/.ruby-version b/.ruby-version index 2c9b4ef4..eb39e538 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.3 +3.3 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1b620224..00000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: ruby -rvm: - - 2.5 - - 2.6 - - 2.7 - -branches: - only: - - master - -before_install: - - gem update --system - - gem install bundler -script: "script/cibuild" -env: - global: - - NOKOGIRI_USE_SYSTEM_LIBRARIES=true - -notifications: - email: false - -cache: bundler diff --git a/Dockerfile b/Dockerfile index 6b84ef29..f0746a25 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG RUBY_VERSION=2.7.3 +ARG RUBY_VERSION=3.3 FROM ruby:$RUBY_VERSION RUN apt-get update \ @@ -8,6 +8,7 @@ RUN apt-get update \ make \ nodejs +# final version for rubygems-update to supoprt ruby 2.7, consider removing this after upgraded to ruby 3.0 RUN gem update --system COPY .git /src/gh/pages-gem/.git diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 3c572c2f..aea69e92 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -1,4 +1,4 @@ -FROM ruby:2.7.3-alpine +FROM ruby:3.3-alpine RUN apk update && apk add --no-cache \ git diff --git a/Gemfile b/Gemfile index 464ed458..31363899 100644 --- a/Gemfile +++ b/Gemfile @@ -8,7 +8,7 @@ gemspec gem "jekyll-octicons" group :test do - gem "rubocop", "~> 0.79" + gem "rubocop", "~> 1.37" gem "rubocop-performance" gem "webmock" end diff --git a/github-pages.gemspec b/github-pages.gemspec index 3602f4f8..dacbb09f 100644 --- a/github-pages.gemspec +++ b/github-pages.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |s| s.add_development_dependency("jekyll_test_plugin_malicious", "~> 0.2") s.add_development_dependency("pry", "~> 0.10") s.add_development_dependency("rspec", "~> 3.3") - s.add_development_dependency("rubocop-github", "0.16.0") + s.add_development_dependency("rubocop-github", "0.20.0") end diff --git a/lib/github-pages/dependencies.rb b/lib/github-pages/dependencies.rb index dba5cc26..ad782395 100644 --- a/lib/github-pages/dependencies.rb +++ b/lib/github-pages/dependencies.rb @@ -7,7 +7,7 @@ module GitHubPages class Dependencies VERSIONS = { # Jekyll - "jekyll" => "3.9.3", + "jekyll" => "3.9.4", "jekyll-sass-converter" => "1.5.2", # Converters @@ -63,7 +63,7 @@ def self.version_report require "nokogiri" { - "ruby" => RUBY_VERSION, + "ruby" => "3.3", # Gem versions we're curious about "github-pages" => VERSION.to_s, diff --git a/script/cibuild-docker b/script/cibuild-docker index 7a6ca87d..374ac15e 100755 --- a/script/cibuild-docker +++ b/script/cibuild-docker @@ -2,8 +2,5 @@ set -ex -# Set the ruby version in the Action definition matrix. -: "${RUBY_VERSION:="2.7.3"}" - -docker build --build-arg "RUBY_VERSION=$RUBY_VERSION" -t github-pages . +docker build -t github-pages . docker run --rm --workdir /src/gh/pages-gem github-pages script/cibuild