Skip to content

Commit

Permalink
cleaner workflow syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro100 committed Apr 10, 2024
1 parent 9f8f81e commit f788ae0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/publish_validator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,15 @@ jobs:

- name: Get current local version
id: get_current_local_version
run: |
echo "VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')" >> $GITHUB_OUTPUT
run: echo "VERSION=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT

- name: Check if version changed
env:
CURRENT_VERSION: ${{ steps.get_current_published_version.outputs.VERSION }}
LOCAL_VERSION: ${{ steps.get_current_local_version.outputs.VERSION }}
run: |
if [ "$CURRENT_VERSION" != "$LOCAL_VERSION" ]; then
echo "Version changed from $CURRENT_VERSION }} to $LOCAL_VERSION"
echo "Version changed from $CURRENT_VERSION to $LOCAL_VERSION"
else
echo "Version did not change"
exit 0
Expand Down

0 comments on commit f788ae0

Please sign in to comment.