Skip to content

Update version badge #4

Update version badge

Update version badge #4

Workflow file for this run

name: Update version badge
on:
release:
types: [published]
jobs:
update_readme:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get current version
id: package_version
run: |
VERSION=$(jq -r .version ./package.json)
echo "::set-output name=version::$VERSION"
- name: Update README file
run: |
sed -i "s|badge/version-.*-blue|badge/version-${{ github.event.release.tag_name }}-blue|g" README.md
- name: Commit and push
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -am "Update README badges"
git push