Skip to content

Commit

Permalink
feature/diff version
Browse files Browse the repository at this point in the history
  • Loading branch information
choewy committed Mar 18, 2024
1 parent 1d38451 commit 38b1605
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/diff.yaml

This file was deleted.

7 changes: 5 additions & 2 deletions .github/workflows/version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- uses: actions/setup-node@v3
with:
node-version: 20

- id: version
run: |
previous_commit=$(git rev-parse HEAD~1)
previous=$(git show $previous_commit:package.json | grep '"version"' | awk -F '"' '{print $4}')
previous=$(git show HEAD^:package.json | grep '"version"' | awk -F '"' '{print $4}')
current=$(git show HEAD:package.json | grep '"version"' | awk -F '"' '{print $4}')
echo "$previous $current"
echo "previous=v$previous" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 38b1605

Please sign in to comment.