Skip to content

Commit e35d3b6

Browse files
authored
fix: skip private sdk packages (#705)
1 parent 1fdeefe commit e35d3b6

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/publish-sdk.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Publish SDK
22
on:
33
push:
4-
branches: ["main"]
4+
branches: [ "main" ]
55

66
env:
77
CI: true
@@ -54,7 +54,7 @@ jobs:
5454
shell: bash
5555
working-directory: sdk
5656
run: |
57-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
57+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
5858
- name: Setup pnpm cache
5959
uses: actions/cache@v4
6060
with:
@@ -107,7 +107,7 @@ jobs:
107107
shell: bash
108108
working-directory: sdk
109109
run: |
110-
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
110+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
111111
- name: Setup pnpm cache
112112
uses: actions/cache@v4
113113
with:
@@ -139,7 +139,13 @@ jobs:
139139
for p in $(pwd)/packages/*
140140
do
141141
cd $p
142-
npm publish --access public
142+
# Check if package is private
143+
if grep -q '"private":\s*true' package.json; then
144+
echo "Skipping private package: $(basename $p)"
145+
else
146+
echo "Publishing package: $(basename $p)"
147+
npm publish --access public
148+
fi
143149
done
144150
else
145151
echo 'Not an sdk release commit, skipping...'

0 commit comments

Comments
 (0)