Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
97b3338
Mention all maintainers in check-new-windows-versions for consistency
eregon Mar 17, 2026
eab2afb
Add ruby-3.3.11
ruby-builder-bot Mar 26, 2026
c515ec1
Update CRuby releases on Windows
ruby-builder-bot Mar 26, 2026
4dc28cf
Add ruby-3.2.11
ruby-builder-bot Mar 27, 2026
3ff19f5
Update CRuby releases on Windows
ruby-builder-bot Mar 27, 2026
2327de0
TruffleRuby 34+ does not support macOS Intel
eregon Mar 27, 2026
ba696ad
Refactor matrix script
ntkme Mar 27, 2026
e65c17d
Add jruby-10.0.5.0
ruby-builder-bot Apr 6, 2026
5d9c71d
Add truffleruby-34.0.0,truffleruby+graalvm-34.0.0
ruby-builder-bot Apr 12, 2026
4c56a21
Darwin-x86_64 is no longer supported on TruffleRuby 34+
eregon Apr 12, 2026
7372622
Give a better error for TruffleRuby 34+ on macOS Intel
eregon Apr 15, 2026
60ecfba
Add ruby-4.0.3
ruby-builder-bot Apr 21, 2026
94e4d89
Add jruby-10.1.0.0
ruby-builder-bot Apr 21, 2026
0cb964f
Update CRuby releases on Windows
ruby-builder-bot Apr 21, 2026
c4e5b13
Add truffleruby-34.0.1,truffleruby+graalvm-34.0.1
ruby-builder-bot Apr 26, 2026
6459287
Replace outdated help.github.com URLs with docs.github.com
fkmy Apr 29, 2026
59a7680
Update Ruby version examples in README to include 4.0
fkmy Apr 29, 2026
98bfeb1
Remove EOL Ruby versions from matrix example in README
fkmy Apr 29, 2026
f02c009
Fix docs.github.com URLs to avoid 301 redirects
fkmy Apr 29, 2026
6aaa311
Add ruby-4.0.4
ruby-builder-bot May 11, 2026
97ecb7b
Update CRuby releases on Windows
ruby-builder-bot May 16, 2026
28c65f7
Update CRuby releases on Windows
ruby-builder-bot May 20, 2026
afeafc3
Add ruby-4.0.5
ruby-builder-bot May 20, 2026
a99ac84
Add jruby-9.4.15.0
ruby-builder-bot Jun 8, 2026
12fd324
Use BUNDLE_LOCKFILE when detecting the lockfile
Thomascountz Nov 28, 2025
89f9052
Add jruby-10.0.6.0
ruby-builder-bot Jun 11, 2026
0df5288
Remove `gem install sassc` on Windows JRuby
eregon Jun 8, 2026
e1a3b10
Improve versions-strings-for-builder.rb
eregon Jun 20, 2026
9eb537c
Add support for ubuntu-26.04 and ubuntu-26.04-arm
eregon Jun 20, 2026
bf35c27
Bump actions/checkout from 6 to 7
dependabot[bot] Jun 22, 2026
0dafeac
Add ruby-3.4.10
ruby-builder-bot Jun 30, 2026
d45b1a4
Update CRuby releases on Windows
ruby-builder-bot Jul 2, 2026
6e5d382
Add ruby-4.0.6
ruby-builder-bot Jul 14, 2026
8e41b36
Update CRuby releases on Windows
ruby-builder-bot Jul 14, 2026
003a5c4
Add ruby-3.3.12
ruby-builder-bot Jul 16, 2026
a30dfa4
Update CRuby releases on Windows
ruby-builder-bot Jul 21, 2026
95ef2b0
Add jruby-10.1.1.0
ruby-builder-bot Jul 22, 2026
b460b2e
Merge tag 'v1.321.0' into sync/upstream-v1.321.0
guptaankit015 Aug 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/check-new-windows-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
check_windows_versions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
fetch-depth: 0

Expand All @@ -35,7 +35,7 @@ jobs:
body: |
Automated PR from the check-new-windows-versions.yml workflow.

@eregon @larskanis Please merge this PR if the diff is correct.
@eregon @MSP-Greg @ntkme @flavorjones @larskanis @headius Please merge this PR if the diff is correct.
And then release setup-ruby by [running the release workflow](https://github.com/ruby/setup-ruby/actions/workflows/release.yml).
branch: windows
delete-branch: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: ./
Expand Down
49 changes: 23 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: ./
with:
ruby-version: ruby
Expand All @@ -37,7 +37,7 @@ jobs:
name: ${{ matrix.os }} ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- uses: ./
with:
Expand Down Expand Up @@ -135,15 +135,12 @@ jobs:
- name: bash test
shell: bash
run: echo ~ && bundle install
- name: Windows JRuby
if: runner.os == 'Windows' && startsWith(matrix.ruby, 'jruby')
run: gem install sassc

testDotRubyVersion:
name: "Test .ruby-version"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- run: echo "ruby-3.4.0" > .ruby-version
- uses: ./
- run: ruby -v | grep -F "ruby 3.4.0"
Expand All @@ -152,7 +149,7 @@ jobs:
name: "Test .tool-versions"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- run: echo -e "nodejs 16.0.0\nruby 3.4.0" > .tool-versions
- uses: ./
- run: ruby -v | grep -F "ruby 3.4.0"
Expand All @@ -161,7 +158,7 @@ jobs:
name: "Test mise.toml"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- run: echo -e "[tools]\nnode = '18'\nruby = '3.4.0'" > mise.toml
- uses: ./
- run: ruby -v | grep -F "ruby 3.4.0"
Expand All @@ -170,7 +167,7 @@ jobs:
name: "Test with no Gemfile"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- run: rm Gemfile
- uses: ./
with:
Expand All @@ -181,7 +178,7 @@ jobs:
name: "Test with no Gemfile but with bundler-cache"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- run: rm Gemfile
- uses: ./
with:
Expand All @@ -204,7 +201,7 @@ jobs:
- { ruby: '2.3', expected_rubygems_version: '3.3.27' }
- { ruby: '2.0', expected_rubygems_version: '2.7.11' }
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: ./
with:
ruby-version: ${{ matrix.ruby }}
Expand All @@ -215,7 +212,7 @@ jobs:
name: "Test rubygems: version upgrades RubyGems to that version if the default is older"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: ./
with:
ruby-version: '2.6'
Expand All @@ -226,7 +223,7 @@ jobs:
name: "Test rubygems: version noops if the default is newer"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: ./
with:
ruby-version: '3.1.0'
Expand All @@ -237,7 +234,7 @@ jobs:
name: "Test rubygems: version uses the Bundler installed by the rubygems update"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: ./
with:
ruby-version: '3.1.0'
Expand All @@ -249,7 +246,7 @@ jobs:
name: "Test bundler: 1.x for old Ruby"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: ./
with:
ruby-version: '2.3'
Expand All @@ -260,7 +257,7 @@ jobs:
name: "Test with a major Bundler version"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: ./
with:
ruby-version: '2.6'
Expand All @@ -271,7 +268,7 @@ jobs:
name: "Test with a minor Bundler version"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: ./
with:
ruby-version: '2.6'
Expand All @@ -282,7 +279,7 @@ jobs:
name: "Test with an exact Bundler version"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: ./
with:
ruby-version: '2.6'
Expand All @@ -294,7 +291,7 @@ jobs:
name: "Test with an older Bundler version than the one of the default gem"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: ./
with:
ruby-version: '4.0'
Expand All @@ -306,7 +303,7 @@ jobs:
name: "Test with a Bundler pre/rc version"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: ./
with:
ruby-version: '2.6'
Expand All @@ -319,7 +316,7 @@ jobs:
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/bundler-dev.gemfile
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: ./
with:
ruby-version: ruby-head
Expand All @@ -331,7 +328,7 @@ jobs:
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/bundler1.gemfile
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: ./
with:
ruby-version: '2.7'
Expand All @@ -349,7 +346,7 @@ jobs:
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: ./
with:
ruby-version: '3.2'
Expand All @@ -360,7 +357,7 @@ jobs:
name: "Test windows-toolchain: none"
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: ./
with:
ruby-version: '2.7'
Expand All @@ -373,7 +370,7 @@ jobs:
name: "Check windows*versions.json are up-to-date"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: ./
with:
ruby-version: ruby
Expand All @@ -385,7 +382,7 @@ jobs:
name: "Check dist/index.js is up-to-date"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- run: yarn install
- run: yarn run package
- name: Check generated files are up to date
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-v1-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
update_branch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
fetch-depth: 0
- run: git push origin HEAD:v1
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ This action currently supports these versions of MRI, JRuby and TruffleRuby:

| Interpreter | Versions |
| ----------- | -------- |
| `ruby` | 1.9.3, 2.0.0, 2.1.9, 2.2, all versions from 2.3.0 until 4.0.2, head, debug, mingw, mswin, ucrt |
| `jruby` | 9.1.17.0 - 10.0.4.0, head |
| `truffleruby` | 19.3.0 - 33.0.1, head |
| `truffleruby+graalvm` | 21.2.0 - 33.0.1, head |
| `ruby` | 1.9.3, 2.0.0, 2.1.9, 2.2, all versions from 2.3.0 until 4.0.6, head, debug, mingw, mswin, ucrt |
| `jruby` | 9.1.17.0 - 10.1.1.0, head |
| `truffleruby` | 19.3.0 - 34.0.1, head |
| `truffleruby+graalvm` | 21.2.0 - 34.0.1, head |

`ruby-debug` is the same as `ruby-head` but with assertions enabled (`-DRUBY_DEBUG=1`).

Expand Down Expand Up @@ -49,7 +49,7 @@ The action works on these [GitHub-hosted runners](https://docs.github.com/en/act

| Operating System | Supported |
| ---------------- | --------- |
| Ubuntu | `ubuntu-22.04`, `ubuntu-24.04`, `ubuntu-22.04-arm`, `ubuntu-24.04-arm` |
| Ubuntu | `ubuntu-22.04`, `ubuntu-24.04`, `ubuntu-26.04`, `ubuntu-22.04-arm`, `ubuntu-24.04-arm`, `ubuntu-26.04-arm` |
| macOS | `macos-14` and newer versions |
| Windows | `windows-2022`, `windows-2025`, `windows-11-arm` |

Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
- uses: actions/checkout@v6
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4' # Not needed with a .ruby-version, .tool-versions or mise.toml
ruby-version: '4.0' # Not needed with a .ruby-version, .tool-versions or mise.toml
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle exec rake
```
Expand All @@ -98,7 +98,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
ruby: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4', head, jruby, jruby-head, truffleruby, truffleruby-head]
ruby: ['3.3', '3.4', '4.0', head, jruby, jruby-head, truffleruby, truffleruby-head]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
Expand Down Expand Up @@ -127,14 +127,14 @@ jobs:
- uses: actions/checkout@v6
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
ruby-version: '4.0'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle exec rake
```

See the GitHub Actions documentation for more details about the
[workflow syntax](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions)
and the [condition and expression syntax](https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions).
[workflow syntax](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax)
and the [condition and expression syntax](https://docs.github.com/en/actions/reference/workflows-and-actions/contexts).

### Supported Version Syntax

Expand Down Expand Up @@ -168,7 +168,7 @@ should be able to fix them by setting `rubygems: 3.0.0` or higher.

By default, Bundler is installed as follows:

* If there is a `Gemfile.lock` file (or `$BUNDLE_GEMFILE.lock` or `gems.locked`) with a `BUNDLED WITH` section,
* If there is a `Gemfile.lock` file (or `$BUNDLE_LOCKFILE`, `$BUNDLE_GEMFILE.lock`, or `gems.locked`) with a `BUNDLED WITH` section,
that version of Bundler will be installed and used.
* If the Ruby ships with Bundler 2.2+ (as a default gem), that version is used.
* Otherwise, the latest compatible Bundler version is installed (Bundler 2 on Ruby >= 2.3, Bundler 1 on Ruby < 2.3).
Expand All @@ -188,7 +188,7 @@ Note that any step doing `bundle install` (for the root `Gemfile`) or `gem insta

This caching speeds up installing gems significantly and avoids too many requests to RubyGems.org.
It needs a `Gemfile` (or `$BUNDLE_GEMFILE` or `gems.rb`) under the [`working-directory`](#working-directory).
If there is a `Gemfile.lock` (or `$BUNDLE_GEMFILE.lock` or `gems.locked`), `bundle config --local deployment true` is used.
If there is a `Gemfile.lock` (or `$BUNDLE_LOCKFILE`, `$BUNDLE_GEMFILE.lock`, or `gems.locked`), `bundle config --local deployment true` is used.

To use a `Gemfile` which is not at the root or has a different name, set `BUNDLE_GEMFILE` in the `env` at the job level
as shown in the [example](#matrix-of-gemfiles).
Expand Down Expand Up @@ -252,7 +252,7 @@ Note that running CI on Windows can be quite challenging if you are not very fam
It is recommended to first get your build working on Ubuntu and macOS before trying Windows.

* Use Bundler 2.2.18+ on Windows (older versions have [bugs](https://github.com/ruby/setup-ruby/issues/209#issuecomment-889064123)) by not setting the `bundler:` input and ensuring there is no `BUNDLED WITH 1.x.y` in a checked-in `Gemfile.lock`.
* The default shell on Windows is not Bash but [PowerShell](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#using-a-specific-shell).
* The default shell on Windows is not Bash but [PowerShell](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#using-a-specific-shell).
This can lead issues such as multi-line scripts [not working as expected](https://github.com/ruby/setup-ruby/issues/13).
* The `PATH` contains [multiple compiler toolchains](https://github.com/ruby/setup-ruby/issues/19). Use `where.exe` to debug which tool is used.
* For Ruby ≥ 2.4, MSYS2 is prepended to the `Path`, similar to what RubyInstaller2 does.
Expand Down
6 changes: 4 additions & 2 deletions bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ function isValidBundlerVersion(bundlerVersion) {
// The returned gemfile is guaranteed to exist, the lockfile might not exist
export function detectGemfiles() {
const gemfilePath = process.env['BUNDLE_GEMFILE'] || 'Gemfile'
const lockfilePath = process.env['BUNDLE_LOCKFILE']

if (fs.existsSync(gemfilePath)) {
return [gemfilePath, `${gemfilePath}.lock`]
return [gemfilePath, lockfilePath || `${gemfilePath}.lock`]
} else if (process.env['BUNDLE_GEMFILE']) {
throw new Error(`$BUNDLE_GEMFILE is set to ${gemfilePath} but does not exist`)
}

if (fs.existsSync("gems.rb")) {
return ["gems.rb", "gems.locked"]
return ["gems.rb", lockfilePath || "gems.locked"]
}

return [null, null]
Expand Down
2 changes: 2 additions & 0 deletions common.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ const GitHubHostedPlatforms = [
'ubuntu-22.04-arm64',
'ubuntu-24.04-x64',
'ubuntu-24.04-arm64',
'ubuntu-26.04-x64',
'ubuntu-26.04-arm64',
'windows-2022-x64',
'windows-2025-x64',
'windows-11-arm64'
Expand Down
Loading
Loading