Skip to content

Commit

Permalink
ci: update README.md automatically on version release
Browse files Browse the repository at this point in the history
  • Loading branch information
chachako committed Aug 4, 2024
1 parent 0766425 commit 203a10a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,22 @@ jobs:
# Read current version
CURRENT_VERSION=$(cat version.txt)
NEW_VERSION=$(semver bump patch $CURRENT_VERSION)
echo "Current version: $CURRENT_VERSION"
echo "New version: $NEW_VERSION"
# Bump version
NEW_VERSION=$(semver bump patch $CURRENT_VERSION)
echo "New version: $NEW_VERSION"
echo $NEW_VERSION > version.txt
# Update README.md
perl -i -pe 's/val mmkvKtxVersion = "[0-9.]*"/val mmkvKtxVersion = "'"$NEW_VERSION"'"/' README.md
perl -i -pe 's/mmkv-ktx = "[0-9.]*"/mmkv-ktx = "'"$NEW_VERSION"'"/' README.md
git add README.md
# Commit version
git config --local user.name "Meowool Robot"
git config --local user.email "[email protected]"
git add version.txt
git commit -m "chore: prepare for next development iteration"
git commit -m 'chore: update version in `README.md` & prepare for next development iteration'
git push

0 comments on commit 203a10a

Please sign in to comment.