Skip to content

Commit

Permalink
Fix create_release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gnmyt committed Aug 30, 2024
1 parent bd46093 commit a36b626
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,22 @@ jobs:
jq ".version = \"${{ steps.get_version.outputs.version }}\"" package.json > tmp.json
mv tmp.json package.json
- name: Commit version change
- name: Check if there are changes to commit
id: check_changes
run: |
git add package.json
if git diff-index --quiet HEAD --; then
echo "No changes to commit."
echo "::set-output name=changes::false"
else
echo "::set-output name=changes::true"
fi
- name: Commit version change to main
if: steps.check_changes.outputs.changes == 'true'
run: |
git config --local user.name "GitHub Actions"
git config --local user.email "[email protected]"
git add package.json
git commit -m "Update version to ${{ steps.get_version.outputs.version }}"
git push origin HEAD:main
Expand Down

0 comments on commit a36b626

Please sign in to comment.