Skip to content

Commit adb00c4

Browse files
committed
fixing version stuff
1 parent bfabfed commit adb00c4

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

.github/workflows/cd.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,11 @@ jobs:
2828

2929
- name: Install Dependencies
3030
run: npm install
31-
31+
3232
- name: Check if package.json has changed
3333
id: check
34-
run: |
35-
if [ $(git diff --name-only HEAD^1 HEAD | grep 'package.json' | wc -l) -eq 0 ]; then
36-
echo "No version change detected in package.json."
37-
else
38-
echo "Version change detected."
39-
fi
40-
34+
uses: EndBug/version-check@v2
35+
4136
- name: Create npm package
4237
run: npm pack
4338

@@ -62,10 +57,10 @@ jobs:
6257
6358
- name: Push package contents to a new branch
6459
run: |
65-
VERSION=$(jq -r '.version' ../package.json)
6660
cd ./release
6761
git add .
68-
git commit -m "Release ${VERSION}"
62+
git commit -m "Release v${{ steps.check.outputs.version }}"
63+
git push origin release
6964
7065
- name: Generate release notes
7166
run: |

0 commit comments

Comments
 (0)