-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: update
README.md
automatically on version release
- Loading branch information
Showing
1 changed file
with
8 additions
and
2 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 |
---|---|---|
|
@@ -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 |