Skip to content

node-gyp uploads and AWS CLI config #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 19 additions & 29 deletions .github/workflows/build-supabase-artifacts.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Supabase Artifacts 🏗
name: Build Supabase Artifacts Linux 🏗

on:
workflow_dispatch:
Expand All @@ -8,7 +8,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
os: [macos-latest, ubuntu-latest]
steps:
- name: Checkout Repository 📥
uses: actions/checkout@v4
Expand All @@ -19,35 +19,25 @@ jobs:
node-version: '20.x'
cache: 'yarn'

- name: Install Dependencies 🧶
- name: Configure AWS CLI for Supabase
env:
AWS_ACCESS_KEY_ID: ${{ secrets.SUPABASE_AWS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SUPABASE_AWS_SECRET }}
AWS_EC2_METADATA_DISABLED: true
run: |
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile supabase-dev
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile supabase-dev
aws configure set region us-east-1 --profile supabase-dev

- name: Install and Build Dependencies 🧶
run: |
yarn
yarn binary:build

- name: Save Artifacts For Supabase CDN 🏗
uses: actions/upload-artifact@v4
with:
name: build-supabase-artifact-${{ matrix.os }}
path: './build/stage/libpg-query-node/'

prepare-and-publish:
needs: build-matrix
runs-on: ubuntu-latest
steps:
- name: Checkout Repository 📥
uses: actions/checkout@v4

- name: Get Artifacts 📖
uses: actions/download-artifact@v4
with:
path: downloaded-artifacts

- name: Prepare artifacts 📦
run: |
find ./downloaded-artifacts
- name: Publish binary
env:
AWS_ACCESS_KEY_ID: ${{ secrets.SUPABASE_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.SUPABASE_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'
run: yarn binary:publish

# - name: Publish to NPM 🚀
# run: |
# # Assuming you've set up your package.json and .npmrc correctly
# npm publish
# env:
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"devDependencies": {
"@launchql/proto-cli": "1.25.0",
"@yamlize/cli": "^0.8.0",
"aws-sdk": "2.1691.0",
"chai": "^3.5.0",
"emnapi": "^0.43.1",
"lodash": "^4.17.15",
Expand All @@ -81,7 +82,10 @@
"binary": {
"module_name": "queryparser",
"module_path": "./build/Release/",
"host": "https://supabase-public-artifacts-bucket.s3.amazonaws.com",
"remote_path": "./libpg-query-node/"
"host": "https://gnbyoxcowpfpalflhptv.supabase.co/storage/v1/s3",
"remote_path": "./libpg-query-node/",
"bucket": "public-artifacts",
"region": "us-east-1",
"s3ForcePathStyle": true
}
}