Browse Source

chore: build macos arm build from macos

Signed-off-by: Pranav C <pranavxc@gmail.com>
feat/better-sqlite3
Pranav C 2 years ago committed by mertmit
parent
commit
c9dd3e7155
  1. 50
      .github/workflows/release-timely-executables.yml

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

@ -62,6 +62,10 @@ jobs:
./make.sh ./make.sh
sudo cp ./ldid /usr/local/bin sudo cp ./ldid /usr/local/bin
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Update nocodb-timely - name: Update nocodb-timely
env: env:
TAG: ${{ github.event.inputs.tag || inputs.tag }} TAG: ${{ github.event.inputs.tag || inputs.tag }}
@ -76,10 +80,6 @@ jobs:
git push --tags git push --tags
- uses: actions/setup-node@v3
with:
node-version: 16
- name : Install dependencies and build executables - name : Install dependencies and build executables
run: | run: |
# install npm dependendencies # install npm dependendencies
@ -111,12 +111,12 @@ jobs:
# build executables # build executables
# npm run build # npm run build
cd ./node_modules/better-sqlite3; # cd ./node_modules/better-sqlite3;
rm -r ./build # rm -r ./build
npx prebuild-install --platform=darwin --arch=arm64 || npx prebuild --platform=darwin --arch=arm64 # npx prebuild-install --platform=darwin --arch=arm64 || npx prebuild --platform=darwin --arch=arm64
cd ../..; # cd ../..;
npx pkg . --compress GZip -t node16-macos-arm64 -o Noco-macos-arm64 # npx pkg . --compress GZip -t node16-macos-arm64 -o Noco-macos-arm64
mv ./Noco-macos-arm64 ./mac-dist/ # mv ./Noco-macos-arm64 ./mac-dist/
cd ./node_modules/better-sqlite3; cd ./node_modules/better-sqlite3;
rm -r ./build rm -r ./build
@ -159,12 +159,42 @@ jobs:
runs-on: macos-latest runs-on: macos-latest
needs: build-executables needs: build-executables
steps: steps:
-
- uses: actions/checkout@v3
with:
token: ${{ secrets.NC_GITHUB_TOKEN }}
repository: 'nocodb/nocodb-timely'
- uses: actions/download-artifact@master - uses: actions/download-artifact@master
with: with:
name: ${{ github.event.inputs.tag || inputs.tag }} name: ${{ github.event.inputs.tag || inputs.tag }}
path: mac-dist 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 - name: Sign macOS executables
run: | run: |
/usr/bin/codesign --force -s - ./mac-dist/Noco-macos-arm64 -v /usr/bin/codesign --force -s - ./mac-dist/Noco-macos-arm64 -v

Loading…
Cancel
Save