diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9e663dd..062235b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 "meowool@proton.me" 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