Skip to content

Commit

Permalink
ci: add/bump Ruby 3.4, move Node to 22 (just-the-docs#1594)
Browse files Browse the repository at this point in the history
This involves some explicit adding of gems that were moved out of the default gems:

- `base64` and `csv` are needed for both Jekyll 3.9 and Jekyll 4.3
- `bigdecimal` is just needed for Jekyll 3.9

In the ideal case, this gets backported to both Jekyll 3.9 and 4.3 so we don't need custom Gemfiles. But, I'm also okay with adding these manually for now, and then reverting once both get a backport that patches this. Reminds me of webrick!
  • Loading branch information
mattxwang authored Jan 13, 2025
1 parent 7fc56e2 commit abb054a
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 29 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
matrix:
jekyll-version: [3.9, 4.3]
os: [ubuntu-latest, macos-latest, windows-latest]
ruby-version: ["3.1", "3.2", "3.3"]
ruby-version: ["3.1", "3.2", "3.3", "3.4"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
ruby-version: "3.4"
bundler-cache: false
- name: Bundle Install
run: bundle install
Expand All @@ -62,7 +62,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby-version: ["3.3"]
ruby-version: ["3.4"]
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:

strategy:
matrix:
node-version: [20.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
ruby-version: "3.4"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
- name: Setup Pages
Expand Down
35 changes: 17 additions & 18 deletions .github/workflows/publish-gem.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
name: Publish Ruby Gem

on:
workflow_dispatch
on: workflow_dispatch

jobs:
build:
name: Publish
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Ruby 3.3
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
- uses: actions/checkout@v4
- name: Setup Ruby 3.4
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4"

- 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 }}

# Disabled as this does not handle 2FA
# - name: Publish to RubyGems
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
source "https://rubygems.org"
gemspec

gem "base64"
gem "csv"

gem "jekyll-github-metadata", ">= 2.15"

gem "jekyll-include-cache", group: :jekyll_plugins
Expand Down
16 changes: 10 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ GEM
fiber-annotation
io-event (~> 1.5, >= 1.5.1)
timers (~> 4.1)
base64 (0.2.0)
bigdecimal (3.1.8)
colorator (1.1.0)
concurrent-ruby (1.3.4)
console (1.25.2)
fiber-annotation
fiber-local (~> 1.1)
json
csv (3.3.2)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
Expand All @@ -36,17 +38,17 @@ GEM
faraday-net_http (>= 2.0, < 3.2)
faraday-net_http (3.1.0)
net-http
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
ffi (1.17.1-arm64-darwin)
ffi (1.17.1-x86_64-linux-gnu)
fiber-annotation (0.2.0)
fiber-local (1.1.0)
fiber-storage
fiber-storage (0.1.0)
forwardable-extended (2.6.0)
google-protobuf (4.28.2-arm64-darwin)
google-protobuf (4.29.3-arm64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.28.2-x86_64-linux)
google-protobuf (4.29.3-x86_64-linux)
bigdecimal
rake (>= 13)
hashery (2.1.2)
Expand Down Expand Up @@ -104,9 +106,9 @@ GEM
mercenary (0.4.0)
net-http (0.4.1)
uri
nokogiri (1.16.5-arm64-darwin)
nokogiri (1.18.1-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.5-x86_64-linux)
nokogiri (1.18.1-x86_64-linux-gnu)
racc (~> 1.4)
octokit (6.1.1)
faraday (>= 1, < 3)
Expand Down Expand Up @@ -155,7 +157,9 @@ PLATFORMS
x86_64-linux-gnu

DEPENDENCIES
base64
bundler (>= 2.3.5)
csv
html-proofer (~> 5.0)
jekyll-github-metadata (>= 2.15)
jekyll-include-cache
Expand Down
4 changes: 4 additions & 0 deletions fixtures/Gemfile-jekyll-3.9
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ source "https://rubygems.org"

gem "jekyll", "~> 3.9"

gem "base64"
gem "bigdecimal"
gem "csv"

gem "jekyll-seo-tag", ">= 2.0"
gem "rake", ">= 12.3.1"

Expand Down
3 changes: 3 additions & 0 deletions fixtures/Gemfile-jekyll-4.3
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ source "https://rubygems.org"

gem "jekyll", "~> 4.3"

gem "base64"
gem "csv"

gem "jekyll-seo-tag", ">= 2.0"
gem "rake", ">= 12.3.1"

Expand Down

0 comments on commit abb054a

Please sign in to comment.