mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 10:03:33 +00:00
add release channel setting and implementation
This commit is contained in:
parent
f14d1f3c5c
commit
4d12a4d6cb
7 changed files with 104 additions and 56 deletions
104
.github/workflows/nightly-release.yml
vendored
104
.github/workflows/nightly-release.yml
vendored
|
|
@ -52,58 +52,58 @@ jobs:
|
||||||
|
|
||||||
Write-Host "Updated package.json version to: $newVersion"
|
Write-Host "Updated package.json version to: $newVersion"
|
||||||
|
|
||||||
# - name: Build and Publish releases (Windows)
|
- name: Build and Publish releases (Windows)
|
||||||
# if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
# env:
|
env:
|
||||||
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# uses: nick-invision/retry@v2.8.2
|
uses: nick-invision/retry@v2.8.2
|
||||||
# with:
|
with:
|
||||||
# timeout_minutes: 30
|
timeout_minutes: 30
|
||||||
# max_attempts: 3
|
max_attempts: 3
|
||||||
# retry_on: error
|
retry_on: error
|
||||||
# command: |
|
command: |
|
||||||
# pnpm run package:win
|
pnpm run package:win
|
||||||
# pnpm run publish:win
|
pnpm run publish:win
|
||||||
# on_retry_command: pnpm cache delete
|
on_retry_command: pnpm cache delete
|
||||||
|
|
||||||
# - name: Build and Publish releases (macOS)
|
- name: Build and Publish releases (macOS)
|
||||||
# if: matrix.os == 'macos-latest'
|
if: matrix.os == 'macos-latest'
|
||||||
# env:
|
env:
|
||||||
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# uses: nick-invision/retry@v2.8.2
|
uses: nick-invision/retry@v2.8.2
|
||||||
# with:
|
with:
|
||||||
# timeout_minutes: 30
|
timeout_minutes: 30
|
||||||
# max_attempts: 3
|
max_attempts: 3
|
||||||
# retry_on: error
|
retry_on: error
|
||||||
# command: |
|
command: |
|
||||||
# pnpm run package:mac
|
pnpm run package:mac
|
||||||
# pnpm run publish:mac
|
pnpm run publish:mac
|
||||||
# on_retry_command: pnpm cache delete
|
on_retry_command: pnpm cache delete
|
||||||
|
|
||||||
# - name: Build and Publish releases (Linux)
|
- name: Build and Publish releases (Linux)
|
||||||
# if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
# env:
|
env:
|
||||||
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# uses: nick-invision/retry@v2.8.2
|
uses: nick-invision/retry@v2.8.2
|
||||||
# with:
|
with:
|
||||||
# timeout_minutes: 30
|
timeout_minutes: 30
|
||||||
# max_attempts: 3
|
max_attempts: 3
|
||||||
# retry_on: error
|
retry_on: error
|
||||||
# command: |
|
command: |
|
||||||
# pnpm run package:linux
|
pnpm run package:linux
|
||||||
# pnpm run publish:linux
|
pnpm run publish:linux
|
||||||
# on_retry_command: pnpm cache delete
|
on_retry_command: pnpm cache delete
|
||||||
|
|
||||||
# - name: Build and Publish releases (Linux ARM64)
|
- name: Build and Publish releases (Linux ARM64)
|
||||||
# if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
# env:
|
env:
|
||||||
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# uses: nick-invision/retry@v2.8.2
|
uses: nick-invision/retry@v2.8.2
|
||||||
# with:
|
with:
|
||||||
# timeout_minutes: 30
|
timeout_minutes: 30
|
||||||
# max_attempts: 3
|
max_attempts: 3
|
||||||
# retry_on: error
|
retry_on: error
|
||||||
# command: |
|
command: |
|
||||||
# pnpm run package:linux-arm64
|
pnpm run package:linux-arm64
|
||||||
# pnpm run publish:linux-arm64
|
pnpm run publish:linux-arm64
|
||||||
# on_retry_command: pnpm cache delete
|
on_retry_command: pnpm cache delete
|
||||||
|
|
|
||||||
|
|
@ -49,3 +49,4 @@ publish:
|
||||||
provider: github
|
provider: github
|
||||||
owner: jeffvli
|
owner: jeffvli
|
||||||
repo: feishin
|
repo: feishin
|
||||||
|
generateUpdatesFilesForAllChannels: true
|
||||||
|
|
|
||||||
|
|
@ -176,9 +176,5 @@
|
||||||
"esbuild"
|
"esbuild"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"build": {
|
|
||||||
"generateUpdateFilesForAllChannels": true,
|
|
||||||
"allowDowngrade": true
|
|
||||||
},
|
|
||||||
"productName": "feishin"
|
"productName": "feishin"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -530,6 +530,10 @@
|
||||||
"customFontPath": "custom font path",
|
"customFontPath": "custom font path",
|
||||||
"customFontPath_description": "sets the path to the custom font to use for the application",
|
"customFontPath_description": "sets the path to the custom font to use for the application",
|
||||||
"disableAutomaticUpdates": "disable automatic updates",
|
"disableAutomaticUpdates": "disable automatic updates",
|
||||||
|
"releaseChannel_optionLatest": "latest",
|
||||||
|
"releaseChannel_optionBeta": "beta",
|
||||||
|
"releaseChannel": "release channel",
|
||||||
|
"releaseChannel_description": "choose between stable releases or beta releases for automatic updates",
|
||||||
"disableLibraryUpdateOnStartup": "disable checking for new versions on startup",
|
"disableLibraryUpdateOnStartup": "disable checking for new versions on startup",
|
||||||
"discordApplicationId": "{{discord}} application id",
|
"discordApplicationId": "{{discord}} application id",
|
||||||
"discordApplicationId_description": "the application id for {{discord}} rich presence (defaults to {{defaultId}})",
|
"discordApplicationId_description": "the application id for {{discord}} rich presence (defaults to {{defaultId}})",
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,10 @@ export default class AppUpdater {
|
||||||
log.transports.file.level = 'info';
|
log.transports.file.level = 'info';
|
||||||
autoUpdater.logger = autoUpdaterLogInterface;
|
autoUpdater.logger = autoUpdaterLogInterface;
|
||||||
autoUpdater.checkForUpdatesAndNotify();
|
autoUpdater.checkForUpdatesAndNotify();
|
||||||
|
|
||||||
|
if (store.get('release_channel') === 'beta') {
|
||||||
|
autoUpdater.channel = 'beta';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import {
|
||||||
SettingsSection,
|
SettingsSection,
|
||||||
} from '/@/renderer/features/settings/components/settings-section';
|
} from '/@/renderer/features/settings/components/settings-section';
|
||||||
import { useSettingsStoreActions, useWindowSettings } from '/@/renderer/store';
|
import { useSettingsStoreActions, useWindowSettings } from '/@/renderer/store';
|
||||||
|
import { Select } from '/@/shared/components/select/select';
|
||||||
import { Switch } from '/@/shared/components/switch/switch';
|
import { Switch } from '/@/shared/components/switch/switch';
|
||||||
|
|
||||||
const localSettings = isElectron() ? window.api.localSettings : null;
|
const localSettings = isElectron() ? window.api.localSettings : null;
|
||||||
|
|
@ -17,6 +18,46 @@ export const UpdateSettings = () => {
|
||||||
const { setSettings } = useSettingsStoreActions();
|
const { setSettings } = useSettingsStoreActions();
|
||||||
|
|
||||||
const updateOptions: SettingOption[] = [
|
const updateOptions: SettingOption[] = [
|
||||||
|
{
|
||||||
|
control: (
|
||||||
|
<Select
|
||||||
|
data={[
|
||||||
|
{
|
||||||
|
label: t('setting.releaseChannel', {
|
||||||
|
context: 'optionLatest',
|
||||||
|
postProcess: 'titleCase',
|
||||||
|
}),
|
||||||
|
value: 'latest',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: t('setting.releaseChannel', {
|
||||||
|
context: 'optionBeta',
|
||||||
|
postProcess: 'titleCase',
|
||||||
|
}),
|
||||||
|
value: 'beta',
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
defaultValue={'latest'}
|
||||||
|
onChange={(value) => {
|
||||||
|
if (!value) return;
|
||||||
|
localSettings?.set('release_channel', value);
|
||||||
|
setSettings({
|
||||||
|
window: {
|
||||||
|
...settings,
|
||||||
|
releaseChannel: value as 'beta' | 'latest',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
value={settings.releaseChannel}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
description: t('setting.releaseChannel', {
|
||||||
|
context: 'description',
|
||||||
|
postProcess: 'sentenceCase',
|
||||||
|
}),
|
||||||
|
isHidden: !isElectron(),
|
||||||
|
title: t('setting.releaseChannel', { postProcess: 'sentenceCase' }),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
control: (
|
control: (
|
||||||
<Switch
|
<Switch
|
||||||
|
|
|
||||||
|
|
@ -333,6 +333,7 @@ export interface SettingsState {
|
||||||
exitToTray: boolean;
|
exitToTray: boolean;
|
||||||
minimizeToTray: boolean;
|
minimizeToTray: boolean;
|
||||||
preventSleepOnPlayback: boolean;
|
preventSleepOnPlayback: boolean;
|
||||||
|
releaseChannel: 'beta' | 'latest';
|
||||||
startMinimized: boolean;
|
startMinimized: boolean;
|
||||||
tray: boolean;
|
tray: boolean;
|
||||||
windowBarStyle: Platform;
|
windowBarStyle: Platform;
|
||||||
|
|
@ -682,6 +683,7 @@ const initialState: SettingsState = {
|
||||||
exitToTray: false,
|
exitToTray: false,
|
||||||
minimizeToTray: false,
|
minimizeToTray: false,
|
||||||
preventSleepOnPlayback: false,
|
preventSleepOnPlayback: false,
|
||||||
|
releaseChannel: 'latest',
|
||||||
startMinimized: false,
|
startMinimized: false,
|
||||||
tray: true,
|
tray: true,
|
||||||
windowBarStyle: platformDefaultWindowBarStyle,
|
windowBarStyle: platformDefaultWindowBarStyle,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue