diff --git a/src/setup-python.ts b/src/setup-python.ts index 0dd45f0..629d456 100644 --- a/src/setup-python.ts +++ b/src/setup-python.ts @@ -53,6 +53,7 @@ function resolveVersionInputFromDefaultFile(): string[] { function resolveVersionInput() { let versions = core.getMultilineInput('python-version'); const versionFile = core.getInput('python-version-file'); + const versionStrategy = core.getInput('python-version-strategy'); if (versions.length) { if (versionFile) { @@ -73,6 +74,9 @@ function resolveVersionInput() { } } + if(versionStrategy == "approximate") + versions.map(v => v.replace(">=", "~").replace("^", "~")); + return versions; }