MSP-Greg
271876da60
Allow running external function before 'bundle install'
...
External actions may use setup-ruby, and some actions make changes/additions to the build environment. These may be needed for dependencies.
Hence, allow those external actions to run code before 'bundle install'. This is done by passing a function as a parameter to setupRuby().
2020-07-01 21:22:43 +02:00
Benoit Daloze
c8a88df157
Refactor how to call setup-ruby from other actions
...
* Automatically use inputs if available, use defaults otherwise.
2020-06-14 16:51:29 +02:00
Benoit Daloze
d57231c9a3
Implement automatic bundle install and caching
...
* Not yet enabled by default.
2020-06-14 13:22:16 +02:00
Benoit Daloze
81be0938f7
Add an exported setupRuby() function which can be called from other actions
...
* Inputs are passed as simple object properties.
* It is recommended to expose the same inputs for other actions.
* See #58 and #33 .
2020-06-06 13:52:42 +02:00
Benoit Daloze
b04e5b8846
Use Bundler 1 on Ruby 2.3
...
* At least until there is a new Bundler 2 release fixing this.
* Fixes https://github.com/ruby/setup-ruby/issues/51
2020-06-06 13:16:46 +02:00
Benoit Daloze
23b9735206
Fix checks for head versions
...
* Always use common.isHeadVersion().
2020-05-15 13:01:01 +02:00
Benoit Daloze
e5857dbffe
Pass the validated engine and version to install()
2020-05-13 23:36:33 +02:00
Benoit Daloze
9f60be7c73
Extract main logic in its own function
...
* So there isn't a giant try/catch around it.
2020-04-18 13:24:09 +02:00
Chris Bailey
29eefdda13
Add support for setting a working directory
2020-04-18 13:22:34 +02:00
Benoit Daloze
f25e77d702
Do not show a "Installing Bundler" group if bundler: none
...
* That was rather confusing.
2020-04-05 20:04:22 +02:00
Benoit Daloze
56996937ab
Clarify messages about the shipped Bundler being reused
2020-04-05 14:16:21 +02:00
Benoit Daloze
e9b0369f85
Add groups to clarify output and measure the time each group takes
2020-04-05 14:09:18 +02:00
Benoit Daloze
045dd42354
Fix indentation
2020-04-05 13:51:43 +02:00
Benoit Daloze
152ff008a3
Extract utility methods to common.js
2020-04-05 13:27:45 +02:00
Benoit Daloze
d4f9058279
Reorder
2020-04-03 23:59:35 +02:00
Benoit Daloze
c40ce85201
Do not install Bundler 2 for ruby-head since it already ships a version that might work better
2020-04-03 23:58:23 +02:00
Benoit Daloze
c68e25cb8c
Explicitly use Bundler 2 if there is no version specified
...
* Avoid issues when using --conservative as seen in
https://github.com/ruby/setup-ruby/pull/48 , clarifies what's getting
installed and simplifies the following logic.
* We'll probably need changes when Bundler 3 comes out anyway.
2020-04-03 23:57:16 +02:00
Benoit Daloze
f964e8aa48
Try to find the Bundler version from Gemfile.lock, otherwise install latest
2020-04-01 00:10:54 +02:00
Benoit Daloze
11238a2c00
Install Bundler at runtime if not already part of the stdlib
...
* This gives more flexibility to choose the Bundler version.
2020-03-31 22:23:11 +02:00
Benoit Daloze
fb9d6fbc69
Automatically create a ~/.gemrc file
...
* To avoid generating documentation on `gem install`, which can take a long time.
2020-03-30 22:04:39 +02:00
MSP-Greg
d785726c7f
export run
2020-03-28 15:28:40 +01:00
Benoit Daloze
67ca12cfaa
Small cleanups
2020-03-07 14:30:46 +01:00
Benoit Daloze
1ad4d1b6db
Reorder functions
2020-03-07 14:23:16 +01:00
Benoit Daloze
2e093de9b3
Use an array of PATH entries rather a string or null
2020-03-07 14:13:52 +01:00
Benoit Daloze
bd9411e978
Remove duplicated code
2020-03-07 13:51:13 +01:00
Benoit Daloze
272cf9d04a
Remove commented code
2020-03-07 13:45:08 +01:00
MSP-Greg
8d89ffaa2b
Reorganize path manipulation, mswin tools ENV
...
1. Use only one 'core' call to set PATH
2. Clean PATH
3. Windows mswin - add vcvars*.bat changes to ENV
2020-03-07 13:41:58 +01:00
Benoit Daloze
0cbcadc627
Restore original spacing
2020-02-24 22:52:23 +01:00
MSP-Greg
20324f7e34
Add ruby-loco mingw and mswin
...
1. Add ruby-loco mingw and mswin
2. Split workflow jobs into common and specials
3. Adjust workflow for mswin - 'ridk version' & 'c extension' steps
2020-02-24 22:01:08 +01:00
Benoit Daloze
3d6280ad19
Add support for .tool-versions
2020-02-16 14:49:55 +01:00
Benoit Daloze
48efd73814
Follow repository transfer and rename
2020-02-06 13:09:38 +01:00
Benoit Daloze
c933cecfdc
Follow ruby-install-builder => ruby-builder repository rename
2020-02-02 13:21:37 +01:00
Benoit Daloze
f5483241db
Add support for ruby-head
2020-02-01 18:22:53 +01:00
Benoit Daloze
3551d3fbd4
Store the available Ruby versions in this repository
...
* That way it's always perfectly synchronized with the action. In
practice querying another repository sometimes returned a stale copy.
* Avoids an extra HTTPS request.
* The axios dependency is no longer needed.
* Makes it possible to tweak the versions available according to the platform.
2020-01-25 18:03:33 +01:00
Benoit Daloze
dbac26120b
Add support for JRuby on Windows
2020-01-19 22:56:19 +01:00
Benoit Daloze
0f26fedc26
Improve error message
2020-01-19 22:55:15 +01:00
Benoit Daloze
a66a46f031
Refactor code to share logic between ruby-install-builder and windows
...
* Make use of ruby-installer-versions.js to validate the version on Windows.
2020-01-19 14:46:57 +01:00
Benoit Daloze
247acff66d
Remove no longer needed workaround
2020-01-19 13:01:02 +01:00
Benoit Daloze
30cd88adf9
Use the newer builds from ruby-install-builder
...
* Which uses a newer OpenSSL for Ruby 2.3 on Ubuntu and macOS.
2020-01-18 16:36:23 +01:00
Benoit Daloze
7005fbe92a
Embed the used tag in this repo for atomic updates
...
* Avoids stale cached requests for the latest_release.tag file.
* This also ensures reproducible builds for this repository.
2020-01-18 16:36:05 +01:00
Benoit Daloze
61efe96192
Use a single bug tracker for the action
2020-01-17 22:30:14 +01:00
Benoit Daloze
0b83c28888
Add a note about the workaround for https://github.com/actions/virtual-environments/issues/242
2020-01-09 18:16:05 +01:00
MSP-Greg
98c68de273
Set CLASSPATH to empty for JRuby
2020-01-09 18:15:08 +01:00
Benoit Daloze
a61be15bff
Read from .ruby-version if version is unset or set to '.ruby-version'
...
* Fixes https://github.com/eregon/use-ruby-action/issues/4
2020-01-06 22:00:45 +01:00
Benoit Daloze
101f62de1d
Add support for Windows
2020-01-05 19:33:14 +01:00
Benoit Daloze
7d189e2075
Improve error message when a version is not available
2020-01-04 16:18:37 +01:00
Benoit Daloze
02a916e783
Support short version syntax
2020-01-03 14:03:19 +01:00
Benoit Daloze
ba0d1c89da
Use the latest release files from ruby-install-builder
2020-01-02 21:19:11 +01:00
Benoit Daloze
a669bed6a4
Extract function to get the Ruby engine and version
2020-01-02 16:15:42 +01:00
Benoit Daloze
3f99912f55
Automatically find the latest stable version
2020-01-02 16:15:42 +01:00