Skip to content

Commit 4e0d93a

Browse files
committed
fix: add version bumping step back to update package.json versions before publish
1 parent 669c68e commit 4e0d93a

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,33 @@ jobs:
7777
- name: Run tests
7878
run: pnpm test
7979

80+
- name: Bump package versions to tag
81+
if: steps.check-tag.outputs.triggered-by-tag == 'true'
82+
run: |
83+
echo "Updating all package.json files to version: ${{ steps.check-tag.outputs.version }}"
84+
85+
# Update root package.json
86+
npm version ${{ steps.check-tag.outputs.version }} --no-git-tag-version
87+
88+
# Update all package.json files in packages/*
89+
for package_dir in packages/*/; do
90+
if [ -f "${package_dir}package.json" ]; then
91+
echo "Updating version in ${package_dir}package.json"
92+
cd "$package_dir"
93+
npm version ${{ steps.check-tag.outputs.version }} --no-git-tag-version
94+
cd - > /dev/null
95+
fi
96+
done
97+
98+
# Show updated versions for verification
99+
echo "Updated versions:"
100+
echo "Root: $(grep '"version"' package.json)"
101+
for package_dir in packages/*/; do
102+
if [ -f "${package_dir}package.json" ]; then
103+
echo "${package_dir}: $(grep '"version"' ${package_dir}package.json)"
104+
fi
105+
done
106+
80107
- name: Generate release notes
81108
if: steps.check-tag.outputs.triggered-by-tag == 'true'
82109
id: release-notes

0 commit comments

Comments
 (0)