From c23c60054af53bb5d6db7d2a8f96529ace31b85d Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Mon, 5 Jun 2023 16:41:27 +0200 Subject: [PATCH 1/2] add note about 1.20 --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 3d280b888..7172d38c2 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,13 @@ steps: - run: go version ``` +> **_NOTE:_** It is better to enclose the version in single quotation mark, due to YAML parsing. When the input is specified like this +> ``` +> 1.20 or >=1.17.0 +> ``` +> 1.20 is parsed as a number and it is trimmed to 1.2 that is an expected behavior for numbers. You should specify input with quotes to treat +> it as a string. + Matching an unstable pre-release: ```yaml From 281217348722143166802dae612c814e5039f37f Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Tue, 6 Jun 2023 16:37:56 +0200 Subject: [PATCH 2/2] Update README.md Co-authored-by: Ivan <98037481+IvanZosimov@users.noreply.github.com> --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7172d38c2..6dafed1f9 100644 --- a/README.md +++ b/README.md @@ -58,13 +58,13 @@ steps: - run: go version ``` -> **_NOTE:_** It is better to enclose the version in single quotation mark, due to YAML parsing. When the input is specified like this -> ``` -> 1.20 or >=1.17.0 +> **Note**: Due to the peculiarities of YAML parsing, it is recommended to wrap the version in single quotation marks: +> +> ```yaml +> go-version: '1.20' > ``` -> 1.20 is parsed as a number and it is trimmed to 1.2 that is an expected behavior for numbers. You should specify input with quotes to treat -> it as a string. - +> +> The recommendation is based on the YAML parser's behavior, which interprets non-wrapped values as numbers and, in the case of version 1.20, trims it down to 1.2, which may not be very obvious. Matching an unstable pre-release: ```yaml