Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

build: beta build (#2069)

Peng Xiao044e6da00d45
diff --git a/.github/workflows/release-desktop-app.yml b/.github/workflows/release-desktop-app.yml
index 4cecad0d61..9d5e327191 100644
--- a/.github/workflows/release-desktop-app.yml
+++ b/.github/workflows/release-desktop-app.yml
@@ -17,11 +17,11 @@ on:
type: boolean
required: true
default: true
- is-canary:
- description: 'Canary Release? The app will be named as "AFFiNE Canary"'
- type: boolean
+ build-type:
+ description: 'Build Type (canary, beta or stable)'
+ type: string
required: true
- default: true
+ default: canary
permissions:
actions: write
@@ -35,7 +35,7 @@ concurrency:
cancel-in-progress: true
env:
- BUILD_TYPE: ${{ github.event.inputs.is-canary == 'true' && 'canary' || 'stable' }}
+ BUILD_TYPE: ${{ github.event.inputs.build-type }}
jobs:
before-make:
diff --git a/apps/electron/forge.config.js b/apps/electron/forge.config.js
index d24a1332ed..81597d05de 100644
--- a/apps/electron/forge.config.js
+++ b/apps/electron/forge.config.js
@@ -5,14 +5,14 @@ const {
const path = require('node:path');
-const isCanary = process.env.BUILD_TYPE === 'canary';
-const buildType = isCanary ? 'canary' : 'stable';
-const productName = isCanary ? 'AFFiNE-Canary' : 'AFFiNE';
-const icoPath = isCanary
- ? './resources/icons/icon_canary.ico'
+const buildType = (process.env.BUILD_TYPE || 'stable').trim().toLowerCase();
+const stableBuild = buildType === 'stable';
+const productName = !stableBuild ? `AFFiNE-${buildType}` : 'AFFiNE';
+const icoPath = !stableBuild
+ ? `./resources/icons/icon_${buildType}.ico`
: './resources/icons/icon.ico';
-const icnsPath = isCanary
- ? './resources/icons/icon_canary.icns'
+const icnsPath = !stableBuild
+ ? `./resources/icons/icon_${buildType}.icns`
: './resources/icons/icon.icns';
const arch =
@@ -24,11 +24,12 @@ const arch =
* @type {import('@electron-forge/shared-types').ForgeConfig}
*/
module.exports = {
- buildIdentifier: isCanary ? 'canary' : 'stable',
+ buildIdentifier: buildType,
packagerConfig: {
name: productName,
appBundleId: fromBuildIdentifier({
canary: 'pro.affine.canary',
+ beta: 'pro.affine.beta',
stable: 'pro.affine.app',
}),
icon: icnsPath,
diff --git a/apps/electron/resources/icons/icon_beta.icns b/apps/electron/resources/icons/icon_beta.icns
new file mode 100644
index 0000000000..3e1e94b383
Binary files /dev/null and b/apps/electron/resources/icons/icon_beta.icns differ
diff --git a/apps/electron/resources/icons/icon_beta.ico b/apps/electron/resources/icons/icon_beta.ico
new file mode 100644
index 0000000000..2c6456b3e4
Binary files /dev/null and b/apps/electron/resources/icons/icon_beta.ico differ