forked from brianc/node-postgres
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (43 loc) · 1.48 KB
/
deploy-pg.yml
File metadata and controls
49 lines (43 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Deploy pg package
on:
push:
branches:
- master
paths:
- 'packages/pg/**'
- '.github/workflows/deploy-pg.yml'
workflow_dispatch:
inputs:
version:
description: 'Version to publish (optional)'
required: false
type: string
permissions:
contents: read
id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
# IMPORTANT: do NOT run a workspace-root install here. pg's
# package.json declares `pg-protocol: npm:@supabase/pg-protocol@^X.Y.Z`,
# and any time we bump pg-protocol's version this workflow would fire
# before that version is on npm (deploy-pg-protocol.yml runs in
# parallel on the same merge commit). Workspace install would then
# fail at resolution. pg is plain JavaScript (no build step, no TS
# compile), so `npm publish` can pack the source files listed under
# the `files` field directly without resolving any dependencies.
defaults:
run:
working-directory: packages/pg
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
# Ensure npm 11.5.1 or later is installed for trusted publishing support
- name: Update npm
run: npm install -g npm@latest
- name: Publish to npm
run: npm publish