diff --git a/README.md b/README.md index c3d09df..d9a7b8f 100644 --- a/README.md +++ b/README.md @@ -156,9 +156,10 @@ These inputs allow you to modify the GitHub release. - If you provide a `tagName` to an existing release, `releaseDraft` must be set to `true` if the existing release is a draft. - If you only want to build the app without having the action upload any assets, for example if you want to only use [`actions/upload-artifact`](https://github.com/actions/upload-artifact), simply omit `tagName`, `releaseName` and `releaseId`. - Only enable `uploadPlainBinary` if you are sure what you're doing since Tauri doesn't officially support a portable mode, especially on platforms other than Windows where standalone binaries for GUI applications basically do not exist. -- `assetNamePattern` offers a few variables that will be replaced automatically if encapsulated in `[]`. Currently available variables are: `[name]`, `[version]`, `[platform]`, `[arch]`, `[mode]`, `[setup]`, `[ext]`. - - `[mode]`: `debug` or `release`, depending on `includeDebug` and `includeRelease`. +- `assetNamePattern` offers a few variables that will be replaced automatically if encapsulated in `[]`. Currently available variables are: `[name]`, `[version]`, `[platform]`, `[arch]`, `[mode]`, `[setup]`, `[_setup]`, `[ext]`. + - `[mode]` will be replaced with `debug` or `release`, depending on `includeDebug` and `includeRelease`. - `[setup]` will be replaced with `-setup` which can be used to differenciate between the NSIS installer and the binary from `uploadPlainBinary`. For all other bundle types it will be an empty string. + - `[_setup]` behaves like `[setup]` but with `_setup` instead of `-setup`. ## Partners diff --git a/dist/index.js b/dist/index.js index 937db4e..e403867 100644 --- a/dist/index.js +++ b/dist/index.js @@ -53194,7 +53194,7 @@ function getAssetName(asset, pattern) { if (asset.name === 'latest.json') { return 'latest.json'; } - if (pattern && asset.name !== 'binary') { + if (pattern) { return renderNamePattern(pattern, asset); } else { @@ -53226,6 +53226,7 @@ function createArtifact({ path, name, debug, platform, arch, bundle, version, }) ext, version, setup: bundle == 'nsis' ? '-setup' : '', + _setup: bundle == 'nsis' ? '_setup' : '', }; } function getPackageJson(root) { diff --git a/src/types.d.ts b/src/types.d.ts index ae4f079..67afaac 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -26,6 +26,7 @@ export interface Artifact { ext: string; version: string; setup: '-setup' | ''; + _setup: '_setup' | ''; } export interface BuildOptions { diff --git a/src/utils.ts b/src/utils.ts index 6f9fdb0..b70f176 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -92,7 +92,7 @@ export function getAssetName(asset: Artifact, pattern?: string) { return 'latest.json'; } - if (pattern && asset.name !== 'binary') { + if (pattern) { return renderNamePattern( pattern, asset as unknown as Record, @@ -147,6 +147,7 @@ export function createArtifact({ ext, version, setup: bundle == 'nsis' ? '-setup' : '', + _setup: bundle == 'nsis' ? '_setup' : '', }; }