👷 Create a workflow which checks if the version got updated (#7) #2
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: Ensure Version Update | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
version-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Check for version update | |
run: | | |
if git diff HEAD^ HEAD --exit-code -- library.json; then | |
echo "Version not updated in library.json" | |
exit 1 | |
else | |
echo "Version updated in library.json" | |
fi |