Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
Refactor version check in pull-request.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cxmeel committed Mar 14, 2024
1 parent b533be6 commit 961c890
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,15 @@ jobs:
- name: Ensure version parity
run: lune run ensure-version-parity

- name: Fetch version from package.json
id: current-version
run: echo "current-version=$(jq -r .version package.json)" >> $GITHUB_ENV

- name: Get previous release version
id: previous-version
run: echo "previous-version=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV

- name: Ensure version has changed
run: ${{ steps.current-version.outputs.current-version != steps.previous-version.outputs.previous-version }}
run: |
current_version=$(jq -r .version package.json)
previous_version=$(git show origin/main:package.json | jq -r .version)
if [ "$current_version" == "$previous_version" ]; then
echo "Version has not changed"
exit 1
fi
- name: Ensure tests exist
run: lune run ensure-tests src
Expand Down

0 comments on commit 961c890

Please sign in to comment.