Skip to content

AnimalAI - v4.2.0

AnimalAI - v4.2.0 #1

name: "Update Latest Release Version in README"
on:
release:
types: [published]
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get latest release version
run: echo "LATEST_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
- name: Update version in README
run: |
sed -i 's#\(\[latest release\](https://github.com/Kinds-of-Intelligence-CFI/animal-ai/releases/tag/v\)[0-9.]*#\1${LATEST_VERSION}#g' README.md
- name: Commit and push changes
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add README.md
git commit -m "Update latest release version to $LATEST_VERSION"
git push