From c19eeb759ffba18600348588d1b0a75c17d17fac Mon Sep 17 00:00:00 2001 From: BradyMitch Date: Fri, 3 Nov 2023 16:41:35 -0700 Subject: [PATCH] Resolve bump version commit --- .github/helpers/bump-version.js | 2 +- .github/workflows/release.yaml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/helpers/bump-version.js b/.github/helpers/bump-version.js index f356749..c8c90ea 100644 --- a/.github/helpers/bump-version.js +++ b/.github/helpers/bump-version.js @@ -53,7 +53,7 @@ const updatePackageVersion = (releaseType) => { packageJson.version = newVersion; fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2) + "\n"); - console.log(`Version bumped from ${oldVersion} to ${newVersion}`); + console.log(newVersion); } catch (error) { console.error(`Error: ${error.message}`); process.exit(1); diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e2f108a..4b2f9a6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -23,7 +23,9 @@ jobs: # Bump version number - name: Bump version - run: node .github/helpers/bump-version.js ${{ github.event.inputs.versionType }} + id: bump_version + run: | + echo "::set-output name=VERSION::$(node .github/helpers/bump-version.js ${{ github.event.inputs.versionType }})" # Commit the bumped version in package.json - name: Commit version bump @@ -31,7 +33,7 @@ jobs: git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add package.json - git commit -m "Release: bump version to ${{ steps.package_version.outputs.VERSION }}" + git commit -m "Release: bump version to ${{ steps.bump_version.outputs.VERSION }}" git push # Create changelog