Skip to content

Commit 85e453e

Browse files
authored
Merge pull request #83 from launchql/feat/upload-node-gyp-s3
node-gyp uploads and AWS CLI config
2 parents 07a6115 + 4cb1680 commit 85e453e

File tree

2 files changed

+25
-31
lines changed

2 files changed

+25
-31
lines changed
Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Supabase Artifacts 🏗
1+
name: Build Supabase Artifacts Linux 🏗
22

33
on:
44
workflow_dispatch:
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ${{ matrix.os }}
99
strategy:
1010
matrix:
11-
os: [windows-latest, macos-latest, ubuntu-latest]
11+
os: [macos-latest, ubuntu-latest]
1212
steps:
1313
- name: Checkout Repository 📥
1414
uses: actions/checkout@v4
@@ -19,35 +19,25 @@ jobs:
1919
node-version: '20.x'
2020
cache: 'yarn'
2121

22-
- name: Install Dependencies 🧶
22+
- name: Configure AWS CLI for Supabase
23+
env:
24+
AWS_ACCESS_KEY_ID: ${{ secrets.SUPABASE_AWS_KEY }}
25+
AWS_SECRET_ACCESS_KEY: ${{ secrets.SUPABASE_AWS_SECRET }}
26+
AWS_EC2_METADATA_DISABLED: true
27+
run: |
28+
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile supabase-dev
29+
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile supabase-dev
30+
aws configure set region us-east-1 --profile supabase-dev
31+
32+
- name: Install and Build Dependencies 🧶
2333
run: |
2434
yarn
2535
yarn binary:build
2636
27-
- name: Save Artifacts For Supabase CDN 🏗
28-
uses: actions/upload-artifact@v4
29-
with:
30-
name: build-supabase-artifact-${{ matrix.os }}
31-
path: './build/stage/libpg-query-node/'
32-
33-
prepare-and-publish:
34-
needs: build-matrix
35-
runs-on: ubuntu-latest
36-
steps:
37-
- name: Checkout Repository 📥
38-
uses: actions/checkout@v4
39-
40-
- name: Get Artifacts 📖
41-
uses: actions/download-artifact@v4
42-
with:
43-
path: downloaded-artifacts
44-
45-
- name: Prepare artifacts 📦
46-
run: |
47-
find ./downloaded-artifacts
37+
- name: Publish binary
38+
env:
39+
AWS_ACCESS_KEY_ID: ${{ secrets.SUPABASE_ACCESS_KEY_ID }}
40+
AWS_SECRET_ACCESS_KEY: ${{ secrets.SUPABASE_SECRET_ACCESS_KEY }}
41+
AWS_REGION: 'us-east-1'
42+
run: yarn binary:publish
4843

49-
# - name: Publish to NPM 🚀
50-
# run: |
51-
# # Assuming you've set up your package.json and .npmrc correctly
52-
# npm publish
53-
# env:

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"devDependencies": {
5656
"@launchql/proto-cli": "1.25.0",
5757
"@yamlize/cli": "^0.8.0",
58+
"aws-sdk": "2.1691.0",
5859
"chai": "^3.5.0",
5960
"emnapi": "^0.43.1",
6061
"lodash": "^4.17.15",
@@ -81,7 +82,10 @@
8182
"binary": {
8283
"module_name": "queryparser",
8384
"module_path": "./build/Release/",
84-
"host": "https://supabase-public-artifacts-bucket.s3.amazonaws.com",
85-
"remote_path": "./libpg-query-node/"
85+
"host": "https://gnbyoxcowpfpalflhptv.supabase.co/storage/v1/s3",
86+
"remote_path": "./libpg-query-node/",
87+
"bucket": "public-artifacts",
88+
"region": "us-east-1",
89+
"s3ForcePathStyle": true
8690
}
8791
}

0 commit comments

Comments
 (0)