Skip to content

Commit 03bdf24

Browse files
authored
Merge pull request #11 from supabase/chore/setup-ci-deploy-workflow
chore(CI): setup ci deploy workflow
2 parents e714b78 + 9e40e66 commit 03bdf24

File tree

7 files changed

+2885
-2099
lines changed

7 files changed

+2885
-2099
lines changed

.github/workflows/ci.yml

-75
This file was deleted.
+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy pg-protocol package
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'packages/pg-protocol/**'
9+
workflow_dispatch:
10+
inputs:
11+
version:
12+
description: 'Version to publish (optional)'
13+
required: false
14+
type: string
15+
16+
jobs:
17+
deploy:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '18'
26+
registry-url: 'https://registry.npmjs.org'
27+
28+
- name: Install dependencies
29+
run: yarn install --frozen-lockfile
30+
31+
- name: Build package
32+
run: cd packages/pg-protocol && yarn build
33+
34+
- name: Publish to npm
35+
run: cd packages/pg-protocol && npm publish
36+
env:
37+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/deploy-pg.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy pg package
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'packages/pg/**'
9+
workflow_dispatch:
10+
inputs:
11+
version:
12+
description: 'Version to publish (optional)'
13+
required: false
14+
type: string
15+
16+
jobs:
17+
deploy:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '18'
26+
registry-url: 'https://registry.npmjs.org'
27+
28+
- name: Install dependencies
29+
run: yarn install --frozen-lockfile
30+
31+
- name: Build package
32+
run: cd packages/pg && yarn build
33+
34+
- name: Publish to npm
35+
run: cd packages/pg && npm publish
36+
env:
37+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,6 @@
3636
"arrowParens": "always",
3737
"trailingComma": "es5",
3838
"singleQuote": true
39-
}
39+
},
40+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
4041
}

packages/pg-protocol/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "pg-protocol",
3-
"version": "1.8.1",
2+
"name": "@supabase/pg-protocol",
3+
"version": "0.0.2",
44
"description": "The postgres client/server binary protocol, implemented in TypeScript",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

packages/pg/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "pg",
3-
"version": "8.14.2",
2+
"name": "@supabase/pg",
3+
"version": "0.0.2",
44
"description": "PostgreSQL client - pure javascript & libpq with the same API",
55
"keywords": [
66
"database",
@@ -22,7 +22,7 @@
2222
"dependencies": {
2323
"pg-connection-string": "^2.7.0",
2424
"pg-pool": "^3.8.0",
25-
"pg-protocol": "npm:@supabase/pg-protocol@^1.8.1",
25+
"pg-protocol": "npm:@supabase/pg-protocol@^0.0.1",
2626
"pg-types": "^2.1.0",
2727
"pgpass": "1.x"
2828
},

0 commit comments

Comments
 (0)