Skip to content

Commit 843f2b2

Browse files
ci(release): update changeset command and bump version to 1.0.1
* Modify the check for changesets in the release workflow * Ensure version command runs conditionally based on changes * Update package-lock.json version to 1.0.1
1 parent faa70f7 commit 843f2b2

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

.github/workflows/release.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,23 @@ jobs:
3131
git config user.name "github-actions[bot]"
3232
git config user.email "github-actions[bot]@users.noreply.github.com"
3333
34-
- name: Run version command
35-
run: npx changeset version
36-
37-
- name: Check for changes
34+
- name: Check for changesets
3835
id: check
3936
run: |
40-
if git diff --quiet; then
41-
echo "has_changes=false" >> "$GITHUB_OUTPUT"
42-
else
37+
if npx changeset status 2>/dev/null; then
4338
echo "has_changes=true" >> "$GITHUB_OUTPUT"
39+
else
40+
echo "has_changes=false" >> "$GITHUB_OUTPUT"
4441
fi
4542
43+
- name: Run version command
44+
if: steps.check.outputs.has_changes == 'true'
45+
run: npx changeset version
46+
47+
- name: Update lockfile
48+
if: steps.check.outputs.has_changes == 'true'
49+
run: npm install --package-lock-only
50+
4651
- name: Create or update release PR
4752
if: steps.check.outputs.has_changes == 'true'
4853
env:

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)