Skip to content
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
322 changes: 158 additions & 164 deletions .github/workflows/DuckDBNodeBindingsAndAPI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://npm.pkg.github.com/'
registry-url: 'https://registry.npmjs.org/'
- uses: pnpm/action-setup@v3
with:
version: 9
Expand Down Expand Up @@ -116,173 +116,167 @@ jobs:
run: git status

- name: Publish - Bindings - Linux x64
if: ${{ inputs.publish }}
working-directory: bindings/pkgs/@databrainhq/node-bindings-linux-x64
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
env:
NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}

- name: Publish - Bindings
if: ${{ inputs.publish }}
working-directory: bindings/pkgs/@databrainhq/node-bindings
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
env:
NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}

- name: Publish - API
if: ${{ inputs.publish }}
working-directory: api/pkgs/@databrainhq/node-api
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
env:
NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}

linux_arm64:
name: Linux arm64
runs-on: ubuntu-latest
if: ${{ inputs.linux_arm64 }}
env:
TARGET_ARCH: arm64
CC: aarch64-linux-gnu-gcc
CXX: aarch64-linux-gnu-g++
YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}

steps:
- name: Install aarch64 compilers
run: sudo apt-get update && sudo apt install binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu

- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://npm.pkg.github.com/'

- uses: pnpm/action-setup@v3
- uses: JS-DevTools/npm-publish@v2
with:
version: 9
token: ${{ secrets.DUCKDB_NPM_TOKEN }}
package: bindings/pkgs/@databrainhq/node-bindings-linux-x64

- name: Workspace - Install
run: pnpm install --ignore-scripts

- name: Bindings - Build
working-directory: bindings
run: pnpm run build

- name: Git Status
if: ${{ inputs.publish }}
run: git status

- name: Publish - Bindings - Linux arm64
if: ${{ inputs.publish }}
working-directory: bindings/pkgs/@databrainhq/node-bindings-linux-arm64
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
env:
NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}

macos_arm64:
name: Mac OS X arm64
runs-on: macos-latest
if: ${{ inputs.macos_arm64 }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://npm.pkg.github.com/'

- uses: pnpm/action-setup@v3
- name: Publish - Bindings
- uses: JS-DevTools/npm-publish@v2
with:
version: 9
token: ${{ secrets.DUCKDB_NPM_TOKEN }}
package: bindings/pkgs/@databrainhq/node-bindings

- name: Workspace - Install
run: pnpm install --ignore-scripts

- name: Bindings - Build
working-directory: bindings
run: pnpm run build

- name: Bindings - Test
working-directory: bindings
run: pnpm test

- name: API - Build
working-directory: api
run: pnpm run build

# - name: API - Test
# working-directory: api
# run: pnpm test

- name: Git Status
if: ${{ inputs.publish }}
run: git status

- name: Publish - Bindings - Darwin arm64
if: ${{ inputs.publish }}
working-directory: bindings/pkgs/@databrainhq/node-bindings-darwin-arm64
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
env:
NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}

macos_x64:
name: Mac OS X x64
runs-on: macos-13
if: ${{ inputs.macos_x64 }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://npm.pkg.github.com/'
- uses: pnpm/action-setup@v3
- name: Publish - API
- uses: JS-DevTools/npm-publish@v2
with:
version: 9

- name: Workspace - Install
run: pnpm install --ignore-scripts

- name: Bindings - Build
working-directory: bindings
run: pnpm run build

- name: Bindings - Test
working-directory: bindings
run: pnpm test

- name: API - Build
working-directory: api
run: pnpm run build

# - name: API - Test
# working-directory: api
# run: pnpm test

- name: Git Status
if: ${{ inputs.publish }}
run: git status

- name: Publish - Bindings - Darwin x64
if: ${{ inputs.publish }}
working-directory: bindings/pkgs/@databrainhq/node-bindings-darwin-x64
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
env:
NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}

windows_x64:
token: ${{ secrets.DUCKDB_NPM_TOKEN }}
package: api/pkgs/@databrainhq/node-api

# linux_arm64:
# name: Linux arm64
# runs-on: ubuntu-latest
# if: ${{ inputs.linux_arm64 }}
# env:
# TARGET_ARCH: arm64
# CC: aarch64-linux-gnu-gcc
# CXX: aarch64-linux-gnu-g++
# YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}

# steps:
# - name: Install aarch64 compilers
# run: sudo apt-get update && sudo apt install binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu

# - name: Checkout code
# uses: actions/checkout@v4

# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version: '20'
# registry-url: 'https://registry.npmjs.org/'

# - uses: pnpm/action-setup@v3
# with:
# version: 9

# - name: Workspace - Install
# run: pnpm install --ignore-scripts

# - name: Bindings - Build
# working-directory: bindings
# run: pnpm run build

# - name: Git Status
# if: ${{ inputs.publish }}
# run: git status

# - name: Publish - Bindings - Linux arm64
# if: ${{ inputs.publish }}
# working-directory: bindings/pkgs/@databrainhq/node-bindings-linux-arm64
# run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
# env:
# NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
# YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}

# macos_arm64:
# name: Mac OS X arm64
# runs-on: macos-latest
# if: ${{ inputs.macos_arm64 }}
# steps:
# - name: Checkout code
# uses: actions/checkout@v4

# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version: '20'
# registry-url: 'https://registry.npmjs.org/'

# - uses: pnpm/action-setup@v3
# with:
# version: 9

# - name: Workspace - Install
# run: pnpm install --ignore-scripts

# - name: Bindings - Build
# working-directory: bindings
# run: pnpm run build

# - name: Bindings - Test
# working-directory: bindings
# run: pnpm test

# - name: API - Build
# working-directory: api
# run: pnpm run build

# # - name: API - Test
# # working-directory: api
# # run: pnpm test

# - name: Git Status
# if: ${{ inputs.publish }}
# run: git status

# - name: Publish - Bindings - Darwin arm64
# if: ${{ inputs.publish }}
# working-directory: bindings/pkgs/@databrainhq/node-bindings-darwin-arm64
# run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
# env:
# NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
# YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}

# macos_x64:
# name: Mac OS X x64
# runs-on: macos-13
# if: ${{ inputs.macos_x64 }}
# steps:
# - name: Checkout code
# uses: actions/checkout@v4

# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version: '20'
# registry-url: 'https://registry.npmjs.org/'
# - uses: pnpm/action-setup@v3
# with:
# version: 9

# - name: Workspace - Install
# run: pnpm install --ignore-scripts

# - name: Bindings - Build
# working-directory: bindings
# run: pnpm run build

# - name: Bindings - Test
# working-directory: bindings
# run: pnpm test

# - name: API - Build
# working-directory: api
# run: pnpm run build

# # - name: API - Test
# # working-directory: api
# # run: pnpm test

# - name: Git Status
# if: ${{ inputs.publish }}
# run: git status

# - name: Publish - Bindings - Darwin x64
# if: ${{ inputs.publish }}
# working-directory: bindings/pkgs/@databrainhq/node-bindings-darwin-x64
# run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }}
# env:
# NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
# YOUR_USERNAME: ${{ secrets.YOUR_USERNAME }}

# windows_x64:
name: Windows x64
runs-on: windows-latest
if: ${{ inputs.windows_x64 }}
Expand All @@ -294,7 +288,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://npm.pkg.github.com/'
registry-url: 'https://registry.npmjs.org/'

- uses: pnpm/action-setup@v3
with:
Expand Down
1 change: 0 additions & 1 deletion api/pkgs/@duckdb/node-api/.npmrc

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion bindings/pkgs/@databrainhq/node-bindings-darwin-x64/.npmrc

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion bindings/pkgs/@databrainhq/node-bindings-linux-x64/.npmrc

This file was deleted.

1 change: 0 additions & 1 deletion bindings/pkgs/@databrainhq/node-bindings-win32-x64/.npmrc

This file was deleted.

1 change: 0 additions & 1 deletion bindings/pkgs/@databrainhq/node-bindings/.npmrc

This file was deleted.