-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check in case the new version is already pushed and no changes ha…
…ve been made
- Loading branch information
Showing
1 changed file
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,9 +81,15 @@ jobs: | |
run: | | ||
VERSION=$(node -p "require('./package.json').version") | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
git add package.json | ||
git commit -am "chore:Bump version to ${VERSION}" | ||
git push | ||
git config user.email "[email protected]" | ||
# Check if package.json has changes | ||
if git diff --quiet package.json; then | ||
echo "::notice::Version ${VERSION} is already pushed. No changes to commit." | ||
else | ||
git add package.json | ||
git commit -am "chore: Bump version to ${VERSION}" | ||
git push | ||
fi | ||
|