|
|
|
@ -18,8 +18,47 @@ on:
|
|
|
|
|
NC_GITHUB_TOKEN: |
|
|
|
|
required: true |
|
|
|
|
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: |
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
needs: gen-mac-arm64-binaries |
|
|
|
|
steps: |
|
|
|
|
- uses: actions/checkout@v3 |
|
|
|
|
with: |
|
|
|
@ -62,6 +101,12 @@ jobs:
|
|
|
|
|
./make.sh |
|
|
|
|
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 |
|
|
|
|
with: |
|
|
|
|
node-version: 16 |
|
|
|
@ -85,22 +130,6 @@ jobs:
|
|
|
|
|
# install npm dependendencies |
|
|
|
|
npm i |
|
|
|
|
|
|
|
|
|
# Copy sqlite binaries |
|
|
|
|
# rsync -rvzhP ./binaries/binding/ ./node_modules/sqlite3/lib/binding/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 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 |
|
|
|
|
|
|
|
|
|
# ./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 |
|
|
|
@ -109,14 +138,11 @@ jobs:
|
|
|
|
|
mkdir ./dist |
|
|
|
|
mkdir ./mac-dist |
|
|
|
|
|
|
|
|
|
# build executables |
|
|
|
|
# npm run build |
|
|
|
|
# cd ./node_modules/better-sqlite3; |
|
|
|
|
# rm -r ./build |
|
|
|
|
# npx prebuild-install --platform=darwin --arch=arm64 || npx prebuild --platform=darwin --arch=arm64 |
|
|
|
|
# cd ../..; |
|
|
|
|
# npx pkg . --compress GZip -t node16-macos-arm64 -o Noco-macos-arm64 |
|
|
|
|
# mv ./Noco-macos-arm64 ./mac-dist/ |
|
|
|
|
|
|
|
|
|
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/ |
|
|
|
|
|
|
|
|
|
cd ./node_modules/better-sqlite3; |
|
|
|
|
rm -r ./build |
|
|
|
@ -139,6 +165,21 @@ jobs:
|
|
|
|
|
npx pkg . --compress GZip -t node16-linux-arm64 -o Noco-linux-arm64 |
|
|
|
|
mv ./Noco-linux-arm64 ./dist/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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/ |
|
|
|
|
|
|
|
|
|
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/ |
|
|
|
|
|
|
|
|
|
- name: Upload executables(except mac executables) to release |
|
|
|
|
uses: svenstaro/upload-release-action@v2 |
|
|
|
|
with: |
|
|
|
@ -159,45 +200,12 @@ jobs:
|
|
|
|
|
runs-on: macos-latest |
|
|
|
|
needs: build-executables |
|
|
|
|
steps: |
|
|
|
|
- uses: actions/checkout@v3 |
|
|
|
|
with: |
|
|
|
|
token: ${{ secrets.NC_GITHUB_TOKEN }} |
|
|
|
|
repository: 'nocodb/nocodb-timely' |
|
|
|
|
|
|
|
|
|
- uses: actions/setup-node@v3 |
|
|
|
|
with: |
|
|
|
|
node-version: 16 |
|
|
|
|
|
|
|
|
|
- uses: actions/download-artifact@master |
|
|
|
|
with: |
|
|
|
|
name: ${{ github.event.inputs.tag || inputs.tag }} |
|
|
|
|
path: mac-dist |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Install dependencies and build executables |
|
|
|
|
env: |
|
|
|
|
TAG: ${{ github.event.inputs.tag || inputs.tag }} |
|
|
|
|
run: | |
|
|
|
|
|
|
|
|
|
npm i -E nocodb-daily@$TAG |
|
|
|
|
|
|
|
|
|
# install npm dependendencies |
|
|
|
|
npm i |
|
|
|
|
|
|
|
|
|
# clean up code to optimize size |
|
|
|
|
npx modclean --patterns="default:*" --ignore="nc-lib-gui-daily/**,dayjs/**,express-status-monitor/**,better-sqlite3/**" --run |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# build executables |
|
|
|
|
cd ./node_modules/better-sqlite3; |
|
|
|
|
rm -r ./build |
|
|
|
|
npx prebuild-install --platform=darwin --arch=arm64 || npx prebuild --platform=darwin --arch=arm64 |
|
|
|
|
cd ../..; |
|
|
|
|
npx pkg . --compress GZip -t node16-macos-arm64 -o Noco-macos-arm64 |
|
|
|
|
mv ./Noco-macos-arm64 ./mac-dist/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Sign macOS executables |
|
|
|
|
run: | |
|
|
|
|
/usr/bin/codesign --force -s - ./mac-dist/Noco-macos-arm64 -v |
|
|
|
|