v0.4.2 #2
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 README Badge | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
update-readme: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Update README with latest tag | |
run: | | |
LATEST_TAG=${GITHUB_REF#refs/tags/} | |
sed -i "s|Version:.*|Version: ${LATEST_TAG}|g" README.md | |
git config --global user.name 'GitHub Actions' | |
git config --global user.email 'actions@github.com' | |
git add README.md | |
git commit -m "Update README with latest tag ${LATEST_TAG} [skip ci]" | |
git push |