diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 7e05a45..3872d82 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -2,6 +2,12 @@ name: Build and publish NPM on: workflow_dispatch: + push: + branches: + - main + - rvc3_support + tags: + - 'v*' env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true @@ -13,9 +19,9 @@ jobs: matrix: runner: ["buildjet-2vcpu-ubuntu-2204", "buildjet-2vcpu-ubuntu-2204-arm"] runs-on: ${{ matrix.runner }} - permissions: + permissions: contents: read - packages: write + packages: write steps: - uses: actions/checkout@v3 with: @@ -48,13 +54,14 @@ jobs: with: name: prebuilds-${{ matrix.runner }} path: prebuilds/*.node - + publish: + if: startsWith(github.ref, 'refs/tags/v') runs-on: buildjet-2vcpu-ubuntu-2204 needs: ["build"] - permissions: + permissions: contents: read - packages: write + packages: write steps: - uses: actions/checkout@v3 with: @@ -73,7 +80,7 @@ jobs: echo "Prepared prebuilds..." npm install npm run relocate-prebuilds - + echo "Validating..." npm install npm run test diff --git a/depthai-core b/depthai-core index 690b6a6..e331c76 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 690b6a637942cd56959c549c8e4be07aee676385 +Subproject commit e331c7663427141add2f8664743ba393a67ff5e6 diff --git a/src/device-wrapper.cpp b/src/device-wrapper.cpp index 4b1d866..4eb4160 100644 --- a/src/device-wrapper.cpp +++ b/src/device-wrapper.cpp @@ -12,12 +12,12 @@ Napi::Object DeviceWrapper::Init(Napi::Env env, Napi::Object exports) return exports; } -Napi::Value DeviceWrapper::getAllAvailableDevices(const Napi::CallbackInfo& info) +Napi::Value DeviceWrapper::getAllAvailableDevices(const Napi::CallbackInfo& info) { return DeviceWrapper::deviceInfosToNode(info.Env(), dai::Device::getAllAvailableDevices()); } -Napi::Value DeviceWrapper::getAllConnectedDevices(const Napi::CallbackInfo& info) +Napi::Value DeviceWrapper::getAllConnectedDevices(const Napi::CallbackInfo& info) { return DeviceWrapper::deviceInfosToNode(info.Env(), dai::Device::getAllConnectedDevices()); } @@ -36,7 +36,7 @@ Napi::Array DeviceWrapper::deviceInfosToNode(Napi::Env env, std::vector