From e0a720eb054ab03e8649b5f82e8b5f1a082b01e2 Mon Sep 17 00:00:00 2001 From: Inian Date: Tue, 20 Jul 2021 20:15:51 +0800 Subject: [PATCH] fix build: pkg was unable to package xattr --- .github/workflows/build.yml | 8 +++++--- gh-Dockerfile | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index db7ddcef..f3cf5751 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,8 +49,9 @@ jobs: npm run pkg -- --targets node12-linux-x64,node12-macos-x64 --out-path bin mv bin/server-macos storage-api-macos-x86_64 mv bin/server-linux storage-api-x86_64 - tar -czvf storage-api-linux-x64.tar.gz storage-api-x86_64 migrations/ - tar -czvf storage-api-macos-x64.tar.gz storage-api-macos-x86_64 migrations/ + cp node_modules/fs-xattr/build/Release/xattr.node . + tar -czvf storage-api-linux-x64.tar.gz storage-api-x86_64 migrations/ xattr.node + tar -czvf storage-api-macos-x64.tar.gz storage-api-macos-x86_64 migrations/ xattr.node - name: Upload x64 binary to release uses: svenstaro/upload-release-action@v2 with: @@ -120,8 +121,9 @@ jobs: . ~/.nvm/nvm.sh npm ci npm run build + cp node_modules/fs-xattr/build/Release/xattr.node . npm run pkg -- --targets node12-linux-arm64 --output storage-api-aarch64 - tar -czvf storage-api-aarch64.tar.gz storage-api-aarch64 migrations/ + tar -czvf storage-api-aarch64.tar.gz storage-api-aarch64 migrations/ xattr.node cp storage-api-aarch64.tar.gz /artifacts/storage-api-aarch64.tar.gz - name: Upload binaries to release uses: svenstaro/upload-release-action@v2 diff --git a/gh-Dockerfile b/gh-Dockerfile index 914f54e7..3c1e1ee6 100644 --- a/gh-Dockerfile +++ b/gh-Dockerfile @@ -7,6 +7,7 @@ WORKDIR /root/storage COPY storage-api-x86_64 . COPY migrations ./migrations +COPY node_modules/fs-xattr/build/Release/xattr.node . ENTRYPOINT "./storage-api-x86_64" EXPOSE 5000 \ No newline at end of file