refactor!: remove updaterJsonKeepUniversal (#1185)

This commit is contained in:
Fabian-Lars
2025-11-15 14:01:11 +01:00
committed by GitHub
parent c18827ebec
commit 6d11c279be
7 changed files with 24 additions and 33 deletions

View File

@@ -0,0 +1,5 @@
---
action: major
---
**Breaking Change**: Removed `updaterJsonKeepUniversal`. This is now always enabled.

View File

@@ -78,7 +78,6 @@ jobs:
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
args: ${{ matrix.args }}
updaterJsonKeepUniversal: true
retryAttempts: 1
uploadPlainBinary: true
uploadWorkflowArtifacts: true

View File

@@ -82,11 +82,10 @@ jobs:
These inputs allow you to change how your Tauri project will be build.
| Name | Required | Description | Type | Default |
| -------------------------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ | ------------------------------------------------------------------------------ |
| ----------------------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ | ------------------------------------------------------------------------------ |
| `projectPath` | false | The path to the root of the tauri project relative to the current working directory | string | . |
| `includeUpdaterJson` | false | whether to upload a JSON file for the updater or not (only relevant if the updater is configured) | bool | true |
| `updaterJsonPreferNsis` | false | whether the action will use the NSIS (setup.exe) or WiX (.msi) bundles for the updater JSON if both types exist | bool | `false`. May be changed to `true` for projects using `tauri@v2` in the future. |
| `updaterJsonKeepUniversal` | false | whether the updater JSON file should include universal macOS builds as darwin-universal on top of using it in the aarch64 and x86_64 fields. | bool | false |
| `tauriScript` | false | the script to execute the Tauri CLI. It must not include any args or commands like `build` | string | `npm run\|pnpm\|yarn tauri` |
| `args` | false | Additional arguments to the current build command | string | |
| `retryAttempts` | false | The number of times to re-try building the app if the initial build fails. For now this only affects `tauri build` but may include the upload steps in the future. | number | 0 |

View File

@@ -29,9 +29,6 @@ inputs:
default: 'true'
updaterJsonPreferNsis:
description: 'Whether the action will use the NSIS (setup.exe) or WiX (.msi) bundles for the updater JSON if both types exist. Will default to false. May default to true for apps using tauri@v2 in the future.'
updaterJsonKeepUniversal:
description: 'Whether the updater JSON file should add universal macOS as darwin-universal on top of using it in the darwin-aarch64 and darwin-x86_64 fields if no native builds exist.'
default: 'false'
tauriScript:
description: 'The script to run to build the Tauri app'
args:

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -21,9 +21,6 @@ async function run(): Promise<void> {
core.getInput('projectPath') || process.argv[2],
);
const includeUpdaterJson = core.getBooleanInput('includeUpdaterJson');
const updaterJsonKeepUniversal = core.getBooleanInput(
'updaterJsonKeepUniversal',
);
const retryAttempts = parseInt(core.getInput('retryAttempts') || '0', 10);
const tauriScript = core.getInput('tauriScript');
const args = stringArgv(core.getInput('args'));
@@ -210,7 +207,6 @@ async function run(): Promise<void> {
targetInfo,
info.unzippedSigs,
updaterJsonPreferNsis,
updaterJsonKeepUniversal,
retryAttempts,
githubBaseUrl,
isGitea,

View File

@@ -34,7 +34,6 @@ export async function uploadVersionJSON(
targetInfo: TargetInfo,
unzippedSig: boolean,
updaterJsonPreferNsis: boolean,
updaterJsonKeepUniversal: boolean,
retryAttempts: number,
githubBaseUrl: string,
isGitea: boolean,
@@ -230,13 +229,11 @@ export async function uploadVersionJSON(
};
}
}
if (updaterJsonKeepUniversal || os !== 'darwin' || arch !== 'universal') {
(versionContent.platforms[`${os}-${arch}`] as unknown) = {
signature: readFileSync(signatureFile.path).toString(),
url: updaterFileDownloadUrl,
};
}
}
// This is for the new `{os}-{arch}-{installer}` format
if (os === 'darwin' && arch === 'universal') {
@@ -254,7 +251,6 @@ export async function uploadVersionJSON(
};
}
}
if (updaterJsonKeepUniversal || os !== 'darwin' || arch !== 'universal') {
(versionContent.platforms[
`${os}-${arch}-${signatureFile.bundle}`
] as unknown) = {
@@ -262,7 +258,6 @@ export async function uploadVersionJSON(
url: updaterFileDownloadUrl,
};
}
}
writeFileSync(versionFile, JSON.stringify(versionContent, null, 2));