AnimalAI - v4.2.0 #1
Workflow file for this run
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
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 |