diff --git a/.github/workflows/build-supabase-artifacts.yml b/.github/workflows/build-supabase-artifacts.yml index 402597a..0f0eb61 100644 --- a/.github/workflows/build-supabase-artifacts.yml +++ b/.github/workflows/build-supabase-artifacts.yml @@ -1,4 +1,4 @@ -name: Build Supabase Artifacts ๐Ÿ— +name: Build Supabase Artifacts Linux ๐Ÿ— on: workflow_dispatch: @@ -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 @@ -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: diff --git a/package.json b/package.json index fcb3b7c..2f91d81 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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 } }