Skip to content

Commit 5d8ee8b

Browse files
authored
ci(js): bump package.json version (#20)
1 parent 4c338d4 commit 5d8ee8b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/publish.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,20 @@ jobs:
2323
shell: bash
2424
run: yarn install
2525

26+
- name: Extract version without tag
27+
id: version
28+
run: echo "PACKAGE_VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
29+
30+
- name: Update package versions
31+
run: |
32+
for pkg in packages/*/package.json; do
33+
node -e "
34+
const pkg = require('./$pkg');
35+
pkg.version = '${{ steps.version.outputs.PACKAGE_VERSION }}';
36+
require('fs').writeFileSync('./$pkg', JSON.stringify(pkg, null, 2) + '\n');
37+
"
38+
done
39+
2640
- name: Build clients
2741
shell: bash
2842
run: yarn build

0 commit comments

Comments
 (0)