Skip to content

deploy javascript sdk #4

deploy javascript sdk

deploy javascript sdk #4

name: deploy javascript sdk
on:
workflow_dispatch:
jobs:
build-javascript-sdk-macos-windows:
strategy:
matrix:
os:
[
"macos-latest",
"windows-latest",
]
include:
- neon-out-name: "x86_64-unknown-linux-gnu-index.node"
os: "ubuntu-22.04"
- neon-out-name: "aarch64-unknown-linux-gnu-index.node"
os: "buildjet-4vcpu-ubuntu-2204-arm"
- neon-out-name: "x86_64-apple-darwin-index.node"
os: "macos-latest"
- neon-out-name: "x86_64-pc-windows-gnu-index.node"
os: "windows-latest"
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: korvus/javascript
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Validate cargo is working
uses: postgresml/gh-actions-cargo@master
with:
command: version
- name: Do build
env:
TYPESCRIPT_DECLARATION_FILE: "javascript/index.d.ts"
run: |
npm i
npm run build-release
- name: Upload built .node file
uses: actions/upload-artifact@v3
with:
name: node-artifacts
path: korvus/javascript/dist/${{ matrix.neon-out-name }}
retention-days: 1
build-javascript-sdk-linux:
strategy:
matrix:
os:
[
"ubuntu-22.04",
"buildjet-4vcpu-ubuntu-2204-arm",
]
include:
- neon-out-name: "x86_64-unknown-linux-gnu-index.node"
os: "ubuntu-22.04"
- neon-out-name: "aarch64-unknown-linux-gnu-index.node"
os: "buildjet-4vcpu-ubuntu-2204-arm"
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
defaults:
run:
working-directory: korvus/javascript
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
yum install -y perl-IPC-Cmd
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Validate cargo is working
uses: postgresml/gh-actions-cargo@master
with:
command: version
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Do build
env:
TYPESCRIPT_DECLARATION_FILE: "javascript/index.d.ts"
run: |
npm i
npm run build-release
- name: Upload built .node file
uses: actions/upload-artifact@v3
with:
name: node-artifacts
path: korvus/javascript/dist/${{ matrix.neon-out-name }}
retention-days: 1
# publish-javascript-sdk:
# needs: build-javascript-sdk
# runs-on: "ubuntu-22.04"
# defaults:
# run:
# working-directory: korvus/javascript
# steps:
# - uses: actions/checkout@v3
# - uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# - name: Validate cargo is working
# uses: postgresml/gh-actions-cargo@master
# with:
# command: version
# - name: Create artifact directory
# run: mkdir dist
# - name: Download artifacts
# uses: actions/download-artifact@v3
# with:
# name: node-artifacts
# path: pgml-sdks/rust/pgml/javascript/dist
# - uses: actions/setup-node@v3
# with:
# node-version: '20.x'
# registry-url: 'https://registry.npmjs.org'
# - name: Generate types declaration
# run: |
# npm i
# npm run build
# rm index.node
# - run: npm ci
# - run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}