|
|
@ -18,8 +18,46 @@ on: |
|
|
|
NC_GITHUB_TOKEN: |
|
|
|
NC_GITHUB_TOKEN: |
|
|
|
required: true |
|
|
|
required: true |
|
|
|
jobs: |
|
|
|
jobs: |
|
|
|
|
|
|
|
gen-mac-arm64-binaries: |
|
|
|
|
|
|
|
runs-on: macos-latest |
|
|
|
|
|
|
|
steps: |
|
|
|
|
|
|
|
- uses: actions/setup-python@v4 |
|
|
|
|
|
|
|
with: |
|
|
|
|
|
|
|
python-version: '3.10' |
|
|
|
|
|
|
|
- uses: actions/checkout@v3 |
|
|
|
|
|
|
|
with: |
|
|
|
|
|
|
|
token: ${{ secrets.NC_GITHUB_TOKEN }} |
|
|
|
|
|
|
|
repository: 'nocodb/nocodb-timely' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- uses: actions/setup-node@v3 |
|
|
|
|
|
|
|
with: |
|
|
|
|
|
|
|
node-version: 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Install dependencies and build executables |
|
|
|
|
|
|
|
env: |
|
|
|
|
|
|
|
TAG: ${{ github.event.inputs.tag || inputs.tag }} |
|
|
|
|
|
|
|
run: | |
|
|
|
|
|
|
|
python -V |
|
|
|
|
|
|
|
npm i -E nocodb-daily@$TAG |
|
|
|
|
|
|
|
cat ./package.json |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# build binaries |
|
|
|
|
|
|
|
cd ./node_modules/better-sqlite3; |
|
|
|
|
|
|
|
rm -r ./build |
|
|
|
|
|
|
|
npx prebuild --arch=arm64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@master |
|
|
|
|
|
|
|
with: |
|
|
|
|
|
|
|
name: ${{ github.event.inputs.tag || inputs.tag }}-bin |
|
|
|
|
|
|
|
path: ./node_modules/better-sqlite3/build/Release |
|
|
|
|
|
|
|
retention-days: 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
build-executables: |
|
|
|
build-executables: |
|
|
|
runs-on: ubuntu-latest |
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
|
|
|
needs: gen-mac-arm64-binaries |
|
|
|
steps: |
|
|
|
steps: |
|
|
|
# Get the latest draft release for asset upload url |
|
|
|
# Get the latest draft release for asset upload url |
|
|
|
- uses: cardinalby/git-get-release-action@v1 |
|
|
|
- uses: cardinalby/git-get-release-action@v1 |
|
|
@ -70,6 +108,11 @@ jobs: |
|
|
|
./make.sh |
|
|
|
./make.sh |
|
|
|
sudo cp ./ldid /usr/local/bin |
|
|
|
sudo cp ./ldid /usr/local/bin |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- uses: actions/download-artifact@master |
|
|
|
|
|
|
|
with: |
|
|
|
|
|
|
|
name: ${{ github.event.inputs.tag || inputs.tag }}-bin |
|
|
|
|
|
|
|
path: ./Release |
|
|
|
|
|
|
|
|
|
|
|
- uses: actions/setup-node@v3 |
|
|
|
- uses: actions/setup-node@v3 |
|
|
|
with: |
|
|
|
with: |
|
|
|
node-version: 16 |
|
|
|
node-version: 16 |
|
|
@ -84,28 +127,61 @@ jobs: |
|
|
|
# install npm dependendencies |
|
|
|
# install npm dependendencies |
|
|
|
npm i |
|
|
|
npm i |
|
|
|
|
|
|
|
|
|
|
|
# Build sqlite binaries for all platforms |
|
|
|
|
|
|
|
./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=win32 --fallback-to-build --target_arch=x64 --target_libc=unknown |
|
|
|
|
|
|
|
./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=win32 --fallback-to-build --target_arch=ia32 --target_libc=unknown |
|
|
|
|
|
|
|
./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=darwin --fallback-to-build --target_arch=x64 --target_libc=unknown |
|
|
|
|
|
|
|
./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=darwin --fallback-to-build --target_arch=arm64 --target_libc=unknown |
|
|
|
|
|
|
|
./node_modules/.bin/node-pre-gyp install --directory=./node_modules/sqlite3 --target_platform=linux --fallback-to-build --target_arch=x64 --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=arm64 --target_libc=musl |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# clean up code to optimize size |
|
|
|
# clean up code to optimize size |
|
|
|
npx modclean --patterns="default:*" --ignore="nc-lib-gui/**,dayjs/**,express-status-monitor/**,sqlite3/**" --run |
|
|
|
npx modclean --patterns="default:*" --ignore="nc-lib-gui-daily/**,dayjs/**,express-status-monitor/**,better-sqlite3/**" --run |
|
|
|
|
|
|
|
|
|
|
|
# build executables |
|
|
|
# create build directory |
|
|
|
npm run build |
|
|
|
mkdir ./dist |
|
|
|
|
|
|
|
mkdir ./mac-dist |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# build macos arm64 executable |
|
|
|
|
|
|
|
mkdir -p ./node_modules/better-sqlite3/build/Release/ |
|
|
|
|
|
|
|
rsync -rvzhP ./Release/ ./node_modules/better-sqlite3/build/Release/ |
|
|
|
|
|
|
|
npx pkg . --compress GZip -t node16-macos-arm64 -o Noco-macos-arm64 |
|
|
|
|
|
|
|
mv ./Noco-macos-arm64 ./mac-dist/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# build macos x64 executable |
|
|
|
|
|
|
|
cd ./node_modules/better-sqlite3; |
|
|
|
|
|
|
|
rm -r ./build |
|
|
|
|
|
|
|
npx prebuild-install --platform=darwin --arch=x64 || npx prebuild --platform=darwin --arch=x64 |
|
|
|
|
|
|
|
cd ../..; |
|
|
|
|
|
|
|
npx pkg . --compress GZip -t node16-macos-x64 -o Noco-macos-x64 |
|
|
|
|
|
|
|
mv ./Noco-macos-x64 ./mac-dist/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# build linux x64 executable |
|
|
|
|
|
|
|
cd ./node_modules/better-sqlite3; |
|
|
|
|
|
|
|
rm -r ./build |
|
|
|
|
|
|
|
npx prebuild-install --platform=linux --arch=x64 || npx prebuild --platform=linux --arch=x64 |
|
|
|
|
|
|
|
cd ../..; |
|
|
|
|
|
|
|
npx pkg . --compress GZip -t node16-linux-x64 -o Noco-linux-x64 |
|
|
|
|
|
|
|
mv ./Noco-linux-x64 ./dist/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# build linux arm64 executable |
|
|
|
|
|
|
|
cd ./node_modules/better-sqlite3; |
|
|
|
|
|
|
|
rm -r ./build |
|
|
|
|
|
|
|
npx prebuild-install --platform=linux --arch=arm64 || npx prebuild --platform=linux --arch=arm64 |
|
|
|
|
|
|
|
cd ../..; |
|
|
|
|
|
|
|
npx pkg . --compress GZip -t node16-linux-arm64 -o Noco-linux-arm64 |
|
|
|
|
|
|
|
mv ./Noco-linux-arm64 ./dist/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# build windows x64 executable |
|
|
|
|
|
|
|
cd ./node_modules/better-sqlite3; |
|
|
|
|
|
|
|
rm -r ./build |
|
|
|
|
|
|
|
npx prebuild-install --platform=win32 --arch=x64 || npx prebuild --platform=win32 --arch=x64 |
|
|
|
|
|
|
|
cd ../..; |
|
|
|
|
|
|
|
npx pkg . --compress GZip -t node16-win-x64 -o Noco-win-x64.exe |
|
|
|
|
|
|
|
mv ./Noco-win-x64.exe ./dist/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# build windows arm64 executable |
|
|
|
|
|
|
|
cd ./node_modules/better-sqlite3; |
|
|
|
|
|
|
|
rm -r ./build |
|
|
|
|
|
|
|
npx prebuild-install --platform=win32 --arch=arm64 || npx prebuild --platform=win32 --arch=arm64 |
|
|
|
|
|
|
|
cd ../..; |
|
|
|
|
|
|
|
npx pkg . --compress GZip -t node16-win-arm64 -o Noco-win-arm64.exe |
|
|
|
|
|
|
|
mv ./Noco-win-arm64.exe ./dist/ |
|
|
|
|
|
|
|
|
|
|
|
ls ./dist |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Move macOS executables for signing |
|
|
|
|
|
|
|
mkdir ./mac-dist |
|
|
|
|
|
|
|
mv ./dist/Noco-macos-arm64 ./mac-dist/ |
|
|
|
|
|
|
|
mv ./dist/Noco-macos-x64 ./mac-dist/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Upload win-arm64 build to asset |
|
|
|
- name: Upload win-arm64 build to asset |
|
|
|
id: upload-release-asset |
|
|
|
id: upload-release-asset |
|
|
|