From a07fbc270f79ab1178134e76136a9a1f70b0262d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thau=C3=A3=20Magalh=C3=A3es?= Date: Thu, 28 Mar 2024 12:45:45 -0300 Subject: [PATCH] chore: auto update version fixed --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 163db192..7323e93f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -139,8 +139,8 @@ jobs: repo: context.repo.repo }); const latestRelease = response.data.tag_name; - const versionParts = latestRelease.split('.'); - const newVersion = `${parseInt(versionParts[0])}.${parseInt(versionParts[1]) + 1}.${parseInt(versionParts[2])}`; + const versionParts = latestRelease.replace(/^v/, '').split('.'); + const newVersion = `${parseInt(versionParts[0])}.${parseInt(versionParts[1])}.${parseInt(versionParts[2]) + 1}`; console.log(`::set-output name=new_version::${newVersion}`);