Skip to content

Commit 5153d66

Browse files
committed
feat(ci): electron build
1 parent 3919a02 commit 5153d66

3 files changed

Lines changed: 76 additions & 3 deletions

File tree

.github/workflows/build-app.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Build App
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
workflow_dispatch:
9+
inputs:
10+
tag:
11+
description: Attach to a specific tag/commit for the release
12+
required: false
13+
type: string
14+
15+
permissions:
16+
contents: write
17+
18+
jobs:
19+
build:
20+
name: Build ()
21+
strategy:
22+
matrix:
23+
include:
24+
- os: macos-13
25+
artifact: darwin-x64
26+
ext: dmg
27+
- os: macos-latest
28+
artifact: darwin-arm64
29+
ext: dmg
30+
- os: ubuntu-latest
31+
platform: linux-x64
32+
ext: AppImage
33+
- os: ubuntu-24.04-arm
34+
artifact: linux-arm64
35+
ext: AppImage
36+
- os: windows-latest
37+
artifact: windows-x64-setup
38+
ext: exe
39+
runs-on: ${{ matrix.os }}
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: pnpm/action-setup@v4
43+
with:
44+
run_install: false
45+
- uses: actions/setup-node@v4
46+
with:
47+
node-version: lts/*
48+
cache: pnpm
49+
- run: pnpm install --frozen-lockfile
50+
- name: Build
51+
run: |
52+
pnpm run build:packages
53+
cd apps/deditor && pnpm run build:${{ matrix.platform }}
54+
55+
- name: get-npm-version
56+
id: package-version
57+
uses: martinbeentjes/npm-get-version-action@v1.3.1
58+
with:
59+
path: apps/deditor
60+
61+
- name: Upload To GitHub Releases
62+
uses: softprops/action-gh-release@v2
63+
with:
64+
files: bundle/${{ env.PRODUCT_NAME }}_*
65+
append_body: true
66+
tag_name: ${{ github.event.inputs.tag }}
67+
68+
- name: Upload To GitHub ReleasesAdd commentMore actions
69+
uses: softprops/action-gh-release@v2
70+
with:
71+
files: dist/Deditor-${{ steps.package-version.outputs.current-version }}-${{ matrix.artifact }}.${{ matrix.ext }}
72+
generate_release_notes: true

apps/deditor/electron-builder.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ asarUnpack:
1616
win:
1717
executableName: Deditor
1818
nsis:
19-
artifactName: ${productName}-${version}-setup.${ext}
19+
artifactName: ${productName}-${version}-windows-${arch}-setup.${ext}
2020
shortcutName: ${productName}
2121
uninstallDisplayName: ${productName}
2222
createDesktopShortcut: always
@@ -29,7 +29,7 @@ mac:
2929
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
3030
notarize: false
3131
dmg:
32-
artifactName: ${productName}-${version}.${ext}
32+
artifactName: ${productName}-${version}-darwin-${arch}.${ext}
3333
linux:
3434
target:
3535
- AppImage
@@ -38,7 +38,7 @@ linux:
3838
maintainer: electronjs.org
3939
category: Utility
4040
appImage:
41-
artifactName: ${productName}-${version}.${ext}
41+
artifactName: ${productName}-${version}-linux-${arch}.${ext}
4242
npmRebuild: false
4343
publish:
4444
provider: generic

cspell.config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ words:
1414
- initdb
1515
- isready
1616
- kebabcase
17+
- martinbeentjes
1718
- matchall
1819
- milvus
1920
- minioadmin

0 commit comments

Comments
 (0)