mirror of
https://github.com/tauri-apps/tauri-action.git
synced 2026-01-31 00:35:20 +01:00
feat: Add includeRelease option to allow for disabling release builds (#365)
* Add options for disabling release builds * Update readme * Set includeRelease to true by default * rebuild dist * add changefile --------- Co-authored-by: FabianLars <fabianlars@fabianlars.de>
This commit is contained in:
5
.changes/toggle-release-builds.md
Normal file
5
.changes/toggle-release-builds.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'action': patch
|
||||
---
|
||||
|
||||
Add `includeRelease` option to allow disabling release builds.
|
||||
@@ -195,7 +195,8 @@ jobs:
|
||||
| `prerelease` | false | Whether the release to create is a prerelease or not | bool | false |
|
||||
| `releaseCommitish` | false | Any branch or commit SHA the Git tag is created from, unused if the Git tag already exists | string | SHA of current commit |
|
||||
| `iconPath` | false | path to the PNG icon to use as app icon, relative to the projectPath | string | |
|
||||
| `includeDebug` | false | whether to include a debug build or not | bool | |
|
||||
| `includeDebug` | false | whether to include a debug build or not | bool | false |
|
||||
| `includeRelease` | false | whether to include a release build or not | bool | true |
|
||||
| `tauriScript` | false | the script to execute the Tauri CLI | string | `yarn\|npx tauri` |
|
||||
| `args` | false | Additional arguments to the current build command | string | |
|
||||
|
||||
|
||||
@@ -33,6 +33,9 @@ inputs:
|
||||
includeDebug:
|
||||
description: 'whether to include a debug build or not'
|
||||
default: false
|
||||
includeRelease:
|
||||
description: 'whether to include a release build or not'
|
||||
default: true
|
||||
tauriScript:
|
||||
description: 'the script to run to build the Tauri app'
|
||||
args:
|
||||
|
||||
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -11,7 +11,7 @@ import { uploadVersionJSON } from './upload-version-json';
|
||||
import { buildProject } from './build';
|
||||
import { execCommand, getInfo, getPackageJson } from './utils';
|
||||
|
||||
import type { BuildOptions } from './types';
|
||||
import type { Artifact, BuildOptions } from './types';
|
||||
|
||||
async function run(): Promise<void> {
|
||||
try {
|
||||
@@ -25,6 +25,7 @@ async function run(): Promise<void> {
|
||||
);
|
||||
const distPath = core.getInput('distPath');
|
||||
const iconPath = core.getInput('iconPath');
|
||||
const includeRelease = core.getBooleanInput('includeRelease');
|
||||
const includeDebug = core.getBooleanInput('includeDebug');
|
||||
const tauriScript = core.getInput('tauriScript');
|
||||
const args = stringArgv(core.getInput('args'));
|
||||
@@ -55,7 +56,11 @@ async function run(): Promise<void> {
|
||||
bundleIdentifier,
|
||||
};
|
||||
const info = getInfo(projectPath);
|
||||
const artifacts = await buildProject(projectPath, false, options);
|
||||
const artifacts: Artifact[] = [];
|
||||
if (includeRelease) {
|
||||
const releaseArtifacts = await buildProject(projectPath, false, options);
|
||||
artifacts.push(...releaseArtifacts);
|
||||
}
|
||||
if (includeDebug) {
|
||||
const debugArtifacts = await buildProject(projectPath, true, options);
|
||||
artifacts.push(...debugArtifacts);
|
||||
|
||||
Reference in New Issue
Block a user