From 5d067118dbaace60f57416f2aafbef77c4ca1378 Mon Sep 17 00:00:00 2001 From: Nicolas MARTEAU Date: Fri, 26 Jul 2024 15:21:57 +0200 Subject: [PATCH] chore: v0.0.7 --- .dockerignore | 4 +++- .github/workflows/build.yml | 15 ++++++++++++--- package.json | 4 ++-- src/binding.gyp | 6 ++++-- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.dockerignore b/.dockerignore index 3d6ec33..01ebc5c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,4 +7,6 @@ prebuilds index.d.ts LICENSE README.md -docker \ No newline at end of file +docker +src/build +src/node_modules \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc79f06..d92273b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,10 +22,10 @@ jobs: arch: x64 # - os: macos-11 # platform: darwin-x64 - - os: windows-2020 + - os: windows-latest platform: win32 arch: x64 - - os: windows-2020 + - os: windows-latest platform: win32 arch: ia32 @@ -54,7 +54,16 @@ jobs: # Run container and copy the built file docker run --name ${{ env.PLATFORM }} ${{ env.PLATFORM }} - docker cp ${{ env.PLATFORM }}:C:/heif-converter/src/build/Release/converter.node ./release/converter.${{ env.PLATFORM }}.node + + # Determine the path based on the platform + if [[ "${{ matrix.platform }}" == "win32" ]]; then + CONVERTER_PATH="C:/heif-converter/src/build/Release/converter.node" + else + CONVERTER_PATH="/heif-converter/src/build/Release/converter.node" + fi + + # Copy binary file from container + docker cp ${{ env.PLATFORM }}:${CONVERTER_PATH} ./release/converter.${{ env.PLATFORM }}.node # Clean up the Docker container docker container rm ${{ env.PLATFORM }} diff --git a/package.json b/package.json index 2d0ff91..99ba297 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@myunisoft/heif-converter", "description": "Bindings for the libheif C API to convert an image in Node.js", - "version": "0.0.6", + "version": "0.0.7", "keywords": [ "heif", "heic", @@ -46,7 +46,7 @@ "file-type": "^19.0.0", "heic-convert": "^2.1.0", "node-addon-api": "^8.0.0", - "node-gyp": "^10.1.0", + "node-gyp": "10.0.1", "rimraf": "^6.0.1", "tinybench": "^2.8.0" }, diff --git a/src/binding.gyp b/src/binding.gyp index 41d8aa2..7487a46 100644 --- a/src/binding.gyp +++ b/src/binding.gyp @@ -16,12 +16,14 @@ "defines": [ "NAPI_CPP_EXCEPTIONS" ], "conditions": [ [ - 'OS=="linux"', { + 'OS=="linux"', + { "variables": { "VCPKG_LIB_ROOT%": "