0.0.14 #36
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: Version Check | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
check-version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Verify Package Version | |
run: | | |
old_version=$(git show origin/main:package.json | grep "version" | cut -d'"' -f4) | |
new_version=$(grep "version" package.json | cut -d'"' -f4) | |
if [[ "$old_version" == "$new_version" ]]; then | |
echo "Version is unchanged" | |
exit 1 | |
fi | |
- name: Set check status | |
if: ${{ failure() }} | |
run: | | |
echo "check_conclusion=failure" >>$GITHUB_OUTPUT | |
- name: Set check output | |
if: ${{ failure() }} | |
run: | | |
echo "check_output=Version is unchanged" >>$GITHUB_OUTPUT |