diff --git a/README.md b/README.md index 38c33c0..452b533 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,7 @@ Recommendation: Use the latest available version if possible. **Stack:** - `latest` (recommended) -- follows the latest release automatically. +- `2.3.1` `2.3` - `2.1.3` `2.1` - `2.1.1` - `1.9.3.1` `1.9` diff --git a/dist/index.js b/dist/index.js index 2e97d94..b0c32e2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2584,7 +2584,7 @@ function escapeProperty(s) { /***/ 447: /***/ (function(module) { -module.exports = {"ghc":["8.10.1","8.8.3","8.8.2","8.8.1","8.6.5","8.6.4","8.6.3","8.6.2","8.6.1","8.4.4","8.4.3","8.4.2","8.4.1","8.2.2","8.0.2","7.10.3"],"cabal":["3.2.0.0","3.0.0.0","2.4.1.0","2.4.0.0","2.2.0.0"],"stack":["2.1.3","2.1.1","1.9.3","1.9.1","1.7.1","1.6.5","1.6.3","1.6.1","1.5.1","1.5.0","1.4.0","1.3.2","1.3.0","1.2.0"]}; +module.exports = {"ghc":["8.10.1","8.8.3","8.8.2","8.8.1","8.6.5","8.6.4","8.6.3","8.6.2","8.6.1","8.4.4","8.4.3","8.4.2","8.4.1","8.2.2","8.0.2","7.10.3"],"cabal":["3.2.0.0","3.0.0.0","2.4.1.0","2.4.0.0","2.2.0.0"],"stack":["2.3.1","2.1.3","2.1.1","1.9.3","1.9.1","1.7.1","1.6.5","1.6.3","1.6.1","1.5.1","1.5.0","1.4.0","1.3.2","1.3.0","1.2.0"]}; /***/ }), @@ -10721,13 +10721,11 @@ exports.installTool = installTool; async function stack(version, os) { core.info(`Attempting to install stack ${version}`); const build = { - linux: 'linux-x86_64-static', + linux: `linux-x86_64${version >= '2.3.1' ? '' : '-static'}`, darwin: 'osx-x86_64', win32: 'windows-x86_64' }[os]; - const url = version === 'latest' - ? `https://get.haskellstack.org/stable/${build}.tar.gz` - : `https://github.com/commercialhaskell/stack/releases/download/v${version}/stack-${version}-${build}.tar.gz`; + const url = `https://github.com/commercialhaskell/stack/releases/download/v${version}/stack-${version}-${build}.tar.gz`; const p = await tc.downloadTool(`${url}`).then(tc.extractTar); const [stackPath] = await glob_1.create(`${p}/stack*`, { implicitDescendants: false diff --git a/src/installer.ts b/src/installer.ts index 4dc1402..8057ac5 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -135,15 +135,12 @@ export async function installTool( async function stack(version: string, os: OS): Promise { core.info(`Attempting to install stack ${version}`); const build = { - linux: 'linux-x86_64-static', + linux: `linux-x86_64${version >= '2.3.1' ? '' : '-static'}`, darwin: 'osx-x86_64', win32: 'windows-x86_64' }[os]; - const url = - version === 'latest' - ? `https://get.haskellstack.org/stable/${build}.tar.gz` - : `https://github.com/commercialhaskell/stack/releases/download/v${version}/stack-${version}-${build}.tar.gz`; + const url = `https://github.com/commercialhaskell/stack/releases/download/v${version}/stack-${version}-${build}.tar.gz`; const p = await tc.downloadTool(`${url}`).then(tc.extractTar); const [stackPath] = await glob(`${p}/stack*`, { implicitDescendants: false diff --git a/src/versions.json b/src/versions.json index e90fef1..ecc96dd 100644 --- a/src/versions.json +++ b/src/versions.json @@ -19,6 +19,7 @@ ], "cabal": ["3.2.0.0", "3.0.0.0", "2.4.1.0", "2.4.0.0", "2.2.0.0"], "stack": [ + "2.3.1", "2.1.3", "2.1.1", "1.9.3",