Skip to content

Commit

Permalink
compare versions
Browse files Browse the repository at this point in the history
  • Loading branch information
semih.cavdar committed Mar 19, 2024
1 parent bf2a6e8 commit a86ed15
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
previous_version=$(git show $commit_sha:.github/workflows/publish.yml | awk '/tags/{print $2}' | sed 's/,$//')
echo "previous_version=$previous_version" >> $GITHUB_ENV
- name: Get version
- name: Get main version
id: version
run: |
version=$(git show HEAD:.github/workflows/publish.yml | awk '/tags/{print $2}' | sed 's/,$//')
Expand All @@ -31,4 +31,10 @@ jobs:
run: |
echo "Output is $version"
echo "Output is $previous_version"
- name: Compare versions
id: compare_versions
run: |
if [ "$version" <= "$previous_version" ]; then
echo "Please update the version."
exit 1

0 comments on commit a86ed15

Please sign in to comment.