Skip to content

Commit 2d07052

Browse files
committed
chore(ci): update some config
1 parent 6e73533 commit 2d07052

File tree

2 files changed

+55
-11
lines changed

2 files changed

+55
-11
lines changed

.github/workflows/ci-supabase-js.yml

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,26 @@ jobs:
4545
- name: Start Verdaccio
4646
run: |
4747
npx verdaccio --config .verdaccio/config.yml &
48-
sleep 5
49-
echo "Verdaccio started on http://localhost:4873"
48+
VERDACCIO_PID=$!
49+
echo "Verdaccio started with PID: $VERDACCIO_PID"
50+
51+
- name: Wait for Verdaccio to be ready
52+
run: |
53+
echo "Waiting for Verdaccio to be ready..."
54+
timeout 30 bash -c 'until curl -f http://localhost:4873 > /dev/null 2>&1; do sleep 1; done'
55+
echo "✓ Verdaccio is ready!"
5056
5157
- name: Configure npm to use Verdaccio
5258
run: npm set registry http://localhost:4873/
5359

5460
- name: Publish packages to Verdaccio
5561
run: |
62+
set -e
5663
for pkg in auth-js functions-js postgrest-js realtime-js storage-js supabase-js; do
5764
echo "Publishing @supabase/$pkg to Verdaccio..."
5865
cd packages/core/$pkg
59-
npm publish --registry http://localhost:4873 || echo "Failed to publish $pkg"
66+
npm publish --registry http://localhost:4873
67+
echo "✓ Published @supabase/$pkg"
6068
cd ../../..
6169
done
6270
@@ -173,12 +181,17 @@ jobs:
173181
174182
- name: Start Verdaccio and publish packages
175183
run: |
184+
set -e
176185
npx verdaccio --config .verdaccio/config.yml &
177-
sleep 5
186+
echo "Waiting for Verdaccio to be ready..."
187+
timeout 30 bash -c 'until curl -f http://localhost:4873 > /dev/null 2>&1; do sleep 1; done'
188+
echo "✓ Verdaccio is ready!"
178189
npm set registry http://localhost:4873/
179190
for pkg in auth-js functions-js postgrest-js realtime-js storage-js supabase-js; do
191+
echo "Publishing @supabase/$pkg..."
180192
cd packages/core/$pkg
181-
npm publish --registry http://localhost:4873 || echo "Failed to publish $pkg"
193+
npm publish --registry http://localhost:4873
194+
echo "✓ Published @supabase/$pkg"
182195
cd ../../..
183196
done
184197
@@ -304,12 +317,17 @@ jobs:
304317
305318
- name: Start Verdaccio and publish packages
306319
run: |
320+
set -e
307321
npx verdaccio --config .verdaccio/config.yml &
308-
sleep 5
322+
echo "Waiting for Verdaccio to be ready..."
323+
timeout 30 bash -c 'until curl -f http://localhost:4873 > /dev/null 2>&1; do sleep 1; done'
324+
echo "✓ Verdaccio is ready!"
309325
npm set registry http://localhost:4873/
310326
for pkg in auth-js functions-js postgrest-js realtime-js storage-js supabase-js; do
327+
echo "Publishing @supabase/$pkg..."
311328
cd packages/core/$pkg
312-
npm publish --registry http://localhost:4873 || echo "Failed to publish $pkg"
329+
npm publish --registry http://localhost:4873
330+
echo "✓ Published @supabase/$pkg"
313331
cd ../../..
314332
done
315333
@@ -374,12 +392,17 @@ jobs:
374392
375393
- name: Start Verdaccio and publish packages
376394
run: |
395+
set -e
377396
npx verdaccio --config .verdaccio/config.yml &
378-
sleep 5
397+
echo "Waiting for Verdaccio to be ready..."
398+
timeout 30 bash -c 'until curl -f http://localhost:4873 > /dev/null 2>&1; do sleep 1; done'
399+
echo "✓ Verdaccio is ready!"
379400
npm set registry http://localhost:4873/
380401
for pkg in auth-js functions-js postgrest-js realtime-js storage-js supabase-js; do
402+
echo "Publishing @supabase/$pkg..."
381403
cd packages/core/$pkg
382-
npm publish --registry http://localhost:4873 || echo "Failed to publish $pkg"
404+
npm publish --registry http://localhost:4873
405+
echo "✓ Published @supabase/$pkg"
383406
cd ../../..
384407
done
385408
@@ -445,12 +468,17 @@ jobs:
445468
446469
- name: Start Verdaccio and publish packages
447470
run: |
471+
set -e
448472
npx verdaccio --config .verdaccio/config.yml &
449-
sleep 5
473+
echo "Waiting for Verdaccio to be ready..."
474+
timeout 30 bash -c 'until curl -f http://localhost:4873 > /dev/null 2>&1; do sleep 1; done'
475+
echo "✓ Verdaccio is ready!"
450476
npm set registry http://localhost:4873/
451477
for pkg in auth-js functions-js postgrest-js realtime-js storage-js supabase-js; do
478+
echo "Publishing @supabase/$pkg..."
452479
cd packages/core/$pkg
453-
npm publish --registry http://localhost:4873 || echo "Failed to publish $pkg"
480+
npm publish --registry http://localhost:4873
481+
echo "✓ Published @supabase/$pkg"
454482
cd ../../..
455483
done
456484

project.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "supabase-js-workspace",
3+
"$schema": "node_modules/nx/schemas/project-schema.json",
4+
"projectType": "library",
5+
"targets": {
6+
"local-registry": {
7+
"executor": "@nx/js:verdaccio",
8+
"options": {
9+
"port": 4873,
10+
"config": ".verdaccio/config.yml",
11+
"storage": "tmp/local-registry/storage",
12+
"clear": true
13+
}
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)