Skip to content

Commit 3ca2f44

Browse files
committed
node-gyp uploads and AWS CLI config
1 parent 07a6115 commit 3ca2f44

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed
Lines changed: 26 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,8 +8,15 @@ jobs:
88
runs-on: ${{ matrix.os }}
99
strategy:
1010
matrix:
11-
os: [windows-latest, macos-latest, ubuntu-latest]
11+
# os: [windows-latest, macos-latest, ubuntu-latest]
12+
os: [ubuntu-latest]
1213
steps:
14+
- name: Install AWS CLI
15+
run: |
16+
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
17+
unzip awscliv2.zip
18+
sudo ./aws/install
19+
1320
- name: Checkout Repository 📥
1421
uses: actions/checkout@v4
1522

@@ -19,35 +26,25 @@ jobs:
1926
node-version: '20.x'
2027
cache: 'yarn'
2128

22-
- name: Install Dependencies 🧶
29+
- name: Configure AWS CLI for Supabase
30+
env:
31+
AWS_ACCESS_KEY_ID: ${{ secrets.SUPABASE_AWS_KEY }}
32+
AWS_SECRET_ACCESS_KEY: ${{ secrets.SUPABASE_AWS_SECRET }}
33+
AWS_EC2_METADATA_DISABLED: true
34+
run: |
35+
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile supabase-dev
36+
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile supabase-dev
37+
aws configure set region us-east-1 --profile supabase-dev
38+
39+
- name: Install and Build Dependencies 🧶
2340
run: |
2441
yarn
2542
yarn binary:build
2643
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
44+
- name: Publish binary
45+
env:
46+
AWS_ACCESS_KEY_ID: ${{ secrets.SUPABASE_ACCESS_KEY_ID }}
47+
AWS_SECRET_ACCESS_KEY: ${{ secrets.SUPABASE_SECRET_ACCESS_KEY }}
48+
AWS_REGION: 'us-east-1'
49+
run: yarn binary:publish
4850

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: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@
8181
"binary": {
8282
"module_name": "queryparser",
8383
"module_path": "./build/Release/",
84-
"host": "https://supabase-public-artifacts-bucket.s3.amazonaws.com",
85-
"remote_path": "./libpg-query-node/"
84+
"host": "https://gnbyoxcowpfpalflhptv.supabase.co/storage/v1/s3",
85+
"remote_path": "./libpg-query-node/",
86+
"bucket": "public-artifacts",
87+
"region": "us-east-1",
88+
"s3ForcePathStyle": true
8689
}
8790
}

0 commit comments

Comments
 (0)