mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
desktop: add build script & use nx to run build commands
This commit is contained in:
committed by
Abdullah Atta
parent
3f79ae6403
commit
3da4ced75b
8
.github/workflows/desktop.publish.yml
vendored
8
.github/workflows/desktop.publish.yml
vendored
@@ -126,7 +126,7 @@ jobs:
|
|||||||
CSC_LINK: ${{ secrets.mac_certs }}
|
CSC_LINK: ${{ secrets.mac_certs }}
|
||||||
CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }}
|
CSC_KEY_PASSWORD: ${{ secrets.mac_certs_password }}
|
||||||
run: |
|
run: |
|
||||||
npm run release -- --variant=mas
|
npx nx run release --project @notesnook/desktop -- --variant=mas
|
||||||
npx electron-builder --mac mas --universal -p never
|
npx electron-builder --mac mas --universal -p never
|
||||||
working-directory: ./apps/desktop
|
working-directory: ./apps/desktop
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ jobs:
|
|||||||
APPLE_API_KEY_ID: ${{ secrets.api_key_id }}
|
APPLE_API_KEY_ID: ${{ secrets.api_key_id }}
|
||||||
APPLE_API_KEY_ISSUER: ${{ secrets.api_key_issuer_id }}
|
APPLE_API_KEY_ISSUER: ${{ secrets.api_key_issuer_id }}
|
||||||
run: |
|
run: |
|
||||||
npm run release
|
npx nx run release --project @notesnook/desktop
|
||||||
if [ ${{ inputs.publish-github }} == true ]; then
|
if [ ${{ inputs.publish-github }} == true ]; then
|
||||||
npx electron-builder --mac zip dmg --arm64 --x64 -p always
|
npx electron-builder --mac zip dmg --arm64 --x64 -p always
|
||||||
else
|
else
|
||||||
@@ -192,7 +192,7 @@ jobs:
|
|||||||
npx lerna bootstrap --ignore=@notesnook/mobile -- --prefer-offline --no-audit
|
npx lerna bootstrap --ignore=@notesnook/mobile -- --prefer-offline --no-audit
|
||||||
|
|
||||||
- name: Build Electron wrapper
|
- name: Build Electron wrapper
|
||||||
run: npm run release
|
run: npx nx run release --project @notesnook/desktop
|
||||||
working-directory: ./apps/desktop
|
working-directory: ./apps/desktop
|
||||||
|
|
||||||
- name: Build snap
|
- name: Build snap
|
||||||
@@ -242,7 +242,7 @@ jobs:
|
|||||||
npx lerna bootstrap --ignore=@notesnook/mobile -- --prefer-offline --no-audit
|
npx lerna bootstrap --ignore=@notesnook/mobile -- --prefer-offline --no-audit
|
||||||
|
|
||||||
- name: Build Electron wrapper
|
- name: Build Electron wrapper
|
||||||
run: npm run release
|
run: npx nx run release --project @notesnook/desktop
|
||||||
working-directory: ./apps/desktop
|
working-directory: ./apps/desktop
|
||||||
|
|
||||||
- name: Build app
|
- name: Build app
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
"start": "turbowatch scripts/dev.ts",
|
"start": "turbowatch scripts/dev.ts",
|
||||||
"staging": "zx scripts/build.mjs --run",
|
"staging": "zx scripts/build.mjs --run",
|
||||||
"release": "zx scripts/build.mjs",
|
"release": "zx scripts/build.mjs",
|
||||||
|
"build": "tsc",
|
||||||
"bundle": "esbuild electron=./src/main.ts ./src/preload.ts --external:electron --external:fsevents --minify --bundle --outdir=./build --platform=node --tsconfig=tsconfig.json --define:MAC_APP_STORE=false --define:RELEASE=true",
|
"bundle": "esbuild electron=./src/main.ts ./src/preload.ts --external:electron --external:fsevents --minify --bundle --outdir=./build --platform=node --tsconfig=tsconfig.json --define:MAC_APP_STORE=false --define:RELEASE=true",
|
||||||
"bundle:mas": "esbuild electron=./src/main.ts ./src/preload.ts --minify --external:electron --external:fsevents --bundle --outdir=./build --platform=node --tsconfig=tsconfig.json --define:MAC_APP_STORE=true --define:RELEASE=true",
|
"bundle:mas": "esbuild electron=./src/main.ts ./src/preload.ts --minify --external:electron --external:fsevents --bundle --outdir=./build --platform=node --tsconfig=tsconfig.json --define:MAC_APP_STORE=true --define:RELEASE=true",
|
||||||
"postinstall": "patch-package"
|
"postinstall": "patch-package"
|
||||||
|
|||||||
4
nx.json
4
nx.json
@@ -17,6 +17,10 @@
|
|||||||
"{projectRoot}/languages"
|
"{projectRoot}/languages"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"release": {
|
||||||
|
"dependsOn": ["^build"],
|
||||||
|
"outputs": ["{projectRoot}/build"]
|
||||||
|
},
|
||||||
"build:test": {
|
"build:test": {
|
||||||
"dependsOn": ["^build"],
|
"dependsOn": ["^build"],
|
||||||
"outputs": ["{projectRoot}/build"]
|
"outputs": ["{projectRoot}/build"]
|
||||||
|
|||||||
Reference in New Issue
Block a user