build: beta build (#2069)

This commit is contained in:
Peng Xiao 2023-04-22 00:52:55 +08:00 committed by GitHub
parent 023cbc30ea
commit 044e6da00d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 13 deletions

View File

@ -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:

View File

@ -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,

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB