Skip to content

Commit dd50195

Browse files
teleniekotiensonqin
authored andcommitted
Add Windows ARM64 build
1 parent 92ba45b commit dd50195

File tree

2 files changed

+126
-18
lines changed

2 files changed

+126
-18
lines changed

.github/workflows/build-desktop-release.yml

Lines changed: 125 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ jobs:
270270
name: logseq-linux-arm64-builds
271271
path: builds
272272

273-
build-windows:
273+
build-windows-x64:
274274
runs-on: windows-latest
275275
needs: [ compile-cljs ]
276276
steps:
@@ -321,7 +321,7 @@ jobs:
321321
- name: Upload Artifact for Code Signing
322322
uses: actions/upload-artifact@v4
323323
with:
324-
name: logseq-win64-unsigned-builds
324+
name: logseq-win-x64-unsigned-builds
325325
path: builds
326326

327327
- name: Save Artifact
@@ -335,7 +335,75 @@ jobs:
335335
- name: Upload Artifact
336336
uses: actions/upload-artifact@v4
337337
with:
338-
name: logseq-win64-builds
338+
name: logseq-win-x64-builds
339+
path: builds
340+
341+
build-windows-arm64:
342+
runs-on: windows-latest
343+
needs: [ compile-cljs ]
344+
steps:
345+
- name: Download The Static Asset
346+
uses: actions/download-artifact@v4
347+
with:
348+
name: static
349+
path: static
350+
351+
- name: Retrieve tag version
352+
id: ref
353+
run: echo "version=$(cat ./static/VERSION)" >> $env:GITHUB_OUTPUT
354+
355+
- name: Install Node.js, NPM and Yarn
356+
uses: actions/setup-node@v4
357+
with:
358+
node-version: ${{ env.NODE_VERSION }}
359+
360+
# - name: Cache Node Modules
361+
# uses: actions/cache@v4
362+
# with:
363+
# path: |
364+
# **/node_modules
365+
# key: ${{ runner.os }}-node-modules
366+
367+
- name: Deps Electron app
368+
run: yarn install
369+
working-directory: ./static
370+
371+
- name: Fix Deps Electron app
372+
run: yarn run postinstall
373+
working-directory: ./static/node_modules/dugite/
374+
375+
- name: Build/Release Electron app
376+
run: yarn electron:make-win-arm64
377+
working-directory: ./static
378+
env:
379+
DEBUG: electron-packager
380+
#env:
381+
# CODE_SIGN_CERTIFICATE_FILE: ../codesign.pfx
382+
# CODE_SIGN_CERTIFICATE_PASSWORD: ${{ secrets.CODE_SIGN_CERTIFICATE_PASSWORD }}
383+
384+
- name: Save Artifact for Code Signing
385+
run: |
386+
mkdir builds
387+
mv static\out\make\squirrel.windows\arm64\*.exe builds\Logseq-win-arm64-${{ steps.ref.outputs.version }}.exe
388+
389+
- name: Upload Artifact for Code Signing
390+
uses: actions/upload-artifact@v4
391+
with:
392+
name: logseq-win-arm64-unsigned-builds
393+
path: builds
394+
395+
- name: Save Artifact
396+
run: |
397+
rm builds\*.exe
398+
mv static\out\make\squirrel.windows\arm64\*.nupkg builds\Logseq-win-arm64-${{ steps.ref.outputs.version }}-full.nupkg
399+
mv static\out\make\zip\win32\arm64\*.zip builds\Logseq-win-arm64-${{ steps.ref.outputs.version }}.zip
400+
mv static\out\make\wix\arm64\Logseq.msi builds\Logseq-win-arm64-${{ steps.ref.outputs.version }}.msi
401+
mv static\out\make\squirrel.windows\arm64\RELEASES builds\RELEASES
402+
403+
- name: Upload Artifact
404+
uses: actions/upload-artifact@v4
405+
with:
406+
name: logseq-win-arm64-builds
339407
path: builds
340408

341409
build-macos-x64:
@@ -506,30 +574,45 @@ jobs:
506574

507575
codesign-windows:
508576
if: ${{ github.event_name == 'schedule' || github.event.inputs.build-target == 'nightly' || github.event.inputs.build-target == 'beta' }}
509-
needs: [ build-windows ]
577+
needs: [ build-windows-x64, build-windows-arm64 ]
510578
runs-on: [self-hosted, macos, token]
511579
steps:
512580
- name: Remove old builds
513581
run: rm -rf ./builds && mkdir ./builds
514582

515-
- name: Download Windows Artifact
583+
- name: Download Windows x64 Artifact
516584
uses: actions/download-artifact@v4
517585
with:
518-
name: logseq-win64-unsigned-builds
519-
path: ./builds
586+
name: logseq-win-x64-unsigned-builds
587+
path: ./builds-x64
588+
589+
- name: Download Windows arm64 Artifact
590+
uses: actions/download-artifact@v4
591+
with:
592+
name: logseq-win-arm64-unsigned-builds
593+
path: ./builds-arm64
520594

521595
- name: Sign Windows Executable
522596
run: |
523-
ls -lah ./builds
524-
jsign --storetype ETOKEN --storepass "${PASS}" -t http://timestamp.sectigo.com ./builds/*.exe
597+
ls -lah ./builds-x64
598+
jsign --storetype ETOKEN --storepass "${PASS}" -t http://timestamp.sectigo.com ./builds-x64/*.exe
599+
ls -lah ./builds-arm64
600+
jsign --storetype ETOKEN --storepass "${PASS}" -t http://timestamp.sectigo.com ./builds-arm64/*.exe
525601
env:
526602
PASS: ${{ secrets.CODE_SIGN_CERTIFICATE_PASSWORD }}
527603

528-
- name: Upload Artifact
604+
- name: Upload Artifact x64 (Signed)
529605
uses: actions/upload-artifact@v4
530606
with:
531-
name: logseq-win64-signed-builds
532-
path: builds
607+
name: logseq-win-x64-signed-builds
608+
path: builds-x64
609+
610+
- name: Upload Artifact arm64 (Signed)
611+
uses: actions/upload-artifact@v4
612+
with:
613+
name: logseq-win-arm64-signed-builds
614+
path: builds-arm64
615+
533616

534617
nightly-release:
535618
if: ${{ github.event_name == 'schedule' || github.event.inputs.build-target == 'nightly' }}
@@ -560,16 +643,28 @@ jobs:
560643
name: logseq-linux-arm64-builds
561644
path: ./
562645

563-
- name: Download The Windows Artifact (Signed)
646+
- name: Download The Windows Artifact x64 (Signed)
564647
uses: actions/download-artifact@v4
565648
with:
566-
name: logseq-win64-signed-builds
649+
name: logseq-win-x64-signed-builds
567650
path: ./
568651

569-
- name: Download The Windows Artifact
652+
- name: Download The Windows Artifact x64 (Unsigned)
653+
uses: actions/download-artifact@v4
654+
with:
655+
name: logseq-win-x64-builds
656+
path: ./
657+
658+
- name: Download The Windows Artifact arm64 (Signed)
659+
uses: actions/download-artifact@v4
660+
with:
661+
name: logseq-win-arm64-signed-builds
662+
path: ./
663+
664+
- name: Download The Windows Artifact arm64 (Unsigned)
570665
uses: actions/download-artifact@v4
571666
with:
572-
name: logseq-win64-builds
667+
name: logseq-win-arm64-builds
573668
path: ./
574669

575670
- name: Download Android Artifacts
@@ -643,13 +738,25 @@ jobs:
643738
- name: Download The Windows Artifact (Signed)
644739
uses: actions/download-artifact@v4
645740
with:
646-
name: logseq-win64-signed-builds
741+
name: logseq-win-x64-signed-builds
742+
path: ./
743+
744+
- name: Download The Windows Artifact
745+
uses: actions/download-artifact@v4
746+
with:
747+
name: logseq-win-x64-builds
748+
path: ./
749+
750+
- name: Download The Windows Artifact (Signed)
751+
uses: actions/download-artifact@v4
752+
with:
753+
name: logseq-win-arm64-signed-builds
647754
path: ./
648755

649756
- name: Download The Windows Artifact
650757
uses: actions/download-artifact@v4
651758
with:
652-
name: logseq-win64-builds
759+
name: logseq-win-arm64-builds
653760
path: ./
654761

655762
- name: Download Android Artifacts

resources/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"electron:make": "electron-forge make",
1414
"electron:make-linux-arm64": "electron-forge make --platform=linux --arch=arm64",
1515
"electron:make-macos-arm64": "electron-forge make --platform=darwin --arch=arm64",
16+
"electron:make-win-arm64": "electron-forge make --platform=win32 --arch=arm64",
1617
"electron:publish:github": "electron-forge publish",
1718
"rebuild:all": "electron-rebuild -v 37.2.6 -f",
1819
"postinstall": "install-app-deps"

0 commit comments

Comments
 (0)