Skip to content

Commit

Permalink
Resolve bump version commit
Browse files Browse the repository at this point in the history
  • Loading branch information
BradyMitch committed Nov 3, 2023
1 parent bf4a6e0 commit c19eeb7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/helpers/bump-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,17 @@ 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
run: |
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
Expand Down

0 comments on commit c19eeb7

Please sign in to comment.