Automate AUR publish in tagged release workflow (#22)

This commit is contained in:
2026-03-14 19:49:46 -07:00
committed by GitHub
parent 99f4d2baaf
commit 9eed37420e
36 changed files with 641 additions and 722 deletions

View File

@@ -279,7 +279,11 @@ export function createFirstRunSetupService(deps: {
});
if (
isSetupCompleted(state) &&
!(state.yomitanSetupMode === 'external' && !externalYomitanConfigured && !yomitanSetupSatisfied)
!(
state.yomitanSetupMode === 'external' &&
!externalYomitanConfigured &&
!yomitanSetupSatisfied
)
) {
completed = true;
return refreshWithState(state);

View File

@@ -1,7 +1,10 @@
import * as path from 'path';
function redactSkippedYomitanWriteValue(
actionName: 'importYomitanDictionary' | 'deleteYomitanDictionary' | 'upsertYomitanDictionarySettings',
actionName:
| 'importYomitanDictionary'
| 'deleteYomitanDictionary'
| 'upsertYomitanDictionarySettings',
rawValue: string,
): string {
const trimmed = rawValue.trim();
@@ -18,7 +21,10 @@ function redactSkippedYomitanWriteValue(
}
export function formatSkippedYomitanWriteAction(
actionName: 'importYomitanDictionary' | 'deleteYomitanDictionary' | 'upsertYomitanDictionarySettings',
actionName:
| 'importYomitanDictionary'
| 'deleteYomitanDictionary'
| 'upsertYomitanDictionarySettings',
rawValue: string,
): string {
return `${actionName}(${redactSkippedYomitanWriteValue(actionName, rawValue)})`;

View File

@@ -9,7 +9,11 @@ test('yomitan settings runtime composes opener with built deps', async () => {
const runtime = createYomitanSettingsRuntime({
ensureYomitanExtensionLoaded: async () => ({ id: 'ext' }),
openYomitanSettingsWindow: ({ getExistingWindow, setWindow, yomitanSession: forwardedSession }) => {
openYomitanSettingsWindow: ({
getExistingWindow,
setWindow,
yomitanSession: forwardedSession,
}) => {
calls.push(`open-window:${(forwardedSession as { id: string } | null)?.id ?? 'null'}`);
const current = getExistingWindow();
if (!current) {
@@ -54,5 +58,7 @@ test('yomitan settings runtime warns and does not open when no yomitan session i
await new Promise((resolve) => setTimeout(resolve, 0));
assert.equal(existingWindow, null);
assert.deepEqual(calls, ['warn:Unable to open Yomitan settings: Yomitan session is unavailable.']);
assert.deepEqual(calls, [
'warn:Unable to open Yomitan settings: Yomitan session is unavailable.',
]);
});