Browse Source

Merge pull request #9245 from nocodb/chore/timely-executable-build

chore: Timely executable build action related bug fixes
nc-feat/enable-thumbnail-migration
Pranav C 4 months ago committed by GitHub
parent
commit
2f2395fb72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 60
      .github/workflows/release-timely-executables.yml

60
.github/workflows/release-timely-executables.yml

@ -81,7 +81,7 @@ jobs:
- name : Install dependencies and build executables - name : Install dependencies and build executables
run: | run: |
# install npm dependendencies # install npm dependencies
npm i npm i
# Copy sqlite binaries # Copy sqlite binaries
@ -96,20 +96,50 @@ jobs:
./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --fallback-to-build --target_arch=arm64 --target_libc=glibc ./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --fallback-to-build --target_arch=arm64 --target_libc=glibc
./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --fallback-to-build --target_arch=x64 --target_libc=musl ./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --fallback-to-build --target_arch=x64 --target_libc=musl
./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --fallback-to-build --target_arch=arm64 --target_libc=musl ./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --fallback-to-build --target_arch=arm64 --target_libc=musl
# ./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --fallback-to-build --target_arch=armv6 --target_libc=unknown
# ./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --fallback-to-build --target_arch=armv7 --target_libc=unknown
# clean up code to optimize size # clean up code to optimize size
npx modclean --patterns="default:*" --ignore="nc-lib-gui-daily/**,nocodb-daily/**,dayjs/**,express-status-monitor/**,sqlite3/**" --run npx modclean --patterns="default:*" --ignore="nc-lib-gui-daily/**,nocodb-daily/**,dayjs/**,express-status-monitor/**,sqlite3/**" --run
# build executables mkdir -p ./mac-dist
npm run build mkdir -p ./dist
mkdir ./mac-dist # build darwin x64 executable
mv ./dist/Noco-macos-arm64 ./mac-dist/ npm uninstall sharp
mv ./dist/Noco-macos-x64 ./mac-dist/ npm install --cpu=x64 --os=darwin sharp
npx --yes pkg@5.8.1 . --compress GZip -t node18-macos-x64 -o Noco-macos-x64
mv ./Noco-macos-x64 ./mac-dist/
# build darwin arm64 executable
npm uninstall sharp
npm install --cpu=arm64 --os=darwin sharp
npx --yes pkg@5.8.1 . --compress GZip -t node18-macos-arm64 -o Noco-macos-arm64
mv ./Noco-macos-arm64 ./mac-dist/
# build linux x64 executable
npm uninstall sharp
npm install --cpu=x64 --os=linux sharp
npx --yes pkg@5.8.1 . --compress GZip -t node18-linux-x64 -o Noco-linux-x64
mv ./Noco-linux-x64 ./dist/
# build linux arm64 executable
npm uninstall sharp
npm install --cpu=arm64 --os=linux sharp
npx --yes pkg@5.8.1 . --compress GZip -t node18-linux-arm64 -o Noco-linux-arm64
mv ./Noco-linux-arm64 ./dist/
# build windows x64 executable
npm uninstall sharp
npm install --cpu=x64 --os=win32 sharp
npx --yes pkg@5.8.1 . --compress GZip -t node18-win-x64 -o Noco-win-x64.exe
mv ./Noco-win-x64.exe ./dist/
# build windows arm64 executable
npm uninstall sharp
npm install --cpu=arm64 --os=win32 sharp
npx --yes pkg@5.8.1 . --compress GZip -t node18-win-arm64 -o Noco-win-arm64.exe
mv ./Noco-win-arm64.exe ./dist/
- name: Upload executables(except mac executables) to release - name: Upload executables(except mac executables) to release
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
@ -144,7 +174,7 @@ jobs:
- uses: actions/upload-artifact@master - uses: actions/upload-artifact@master
with: with:
name: ${{ github.event.inputs.tag || inputs.tag }} name: ${{ format('{0}-signed', github.event.inputs.tag || inputs.tag) }}
path: mac-dist path: mac-dist
retention-days: 1 retention-days: 1
@ -155,7 +185,7 @@ jobs:
steps: steps:
- uses: actions/download-artifact@master - uses: actions/download-artifact@master
with: with:
name: ${{ github.event.inputs.tag || inputs.tag }} name: ${{ format('{0}-signed', github.event.inputs.tag || inputs.tag) }}
path: mac-dist path: mac-dist
- name: Upload mac executables to release - name: Upload mac executables to release

Loading…
Cancel
Save