mirror of
https://github.com/tauri-apps/tauri-action.git
synced 2026-01-31 00:35:20 +01:00
refactor!: rename includeUpdaterJson to uploadUpdaterJson (#1208)
This commit is contained in:
5
.changes/rename-includeupdaterjson.md
Normal file
5
.changes/rename-includeupdaterjson.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
action: major
|
||||
---
|
||||
|
||||
**Breaking Change**: Renamed `includeUpdaterJson` to `uploadUpdaterJson` for consistency with other similar options.
|
||||
@@ -173,7 +173,7 @@ jobs:
|
||||
# This file assume you're using the GitHub Release as your updater endpoint.
|
||||
#
|
||||
# default: true
|
||||
includeUpdaterJson: true
|
||||
uploadUpdaterJson: true
|
||||
|
||||
# Whether the action will use the NSIS (setup.exe) or WiX (.msi) bundles for the updater JSON if both types exist.
|
||||
#
|
||||
|
||||
@@ -24,7 +24,7 @@ inputs:
|
||||
projectPath:
|
||||
description: 'Path to the root of the project that will be built. It must NOT be gitignored.'
|
||||
default: '.'
|
||||
includeUpdaterJson:
|
||||
uploadUpdaterJson:
|
||||
description: 'Whether to upload a static JSON file for the updater using GitHub Releases as the CDN'
|
||||
default: 'true'
|
||||
updaterJsonPreferNsis:
|
||||
|
||||
6
dist/index.js
vendored
6
dist/index.js
vendored
@@ -85351,7 +85351,7 @@ async function run() {
|
||||
}
|
||||
if (releaseId) {
|
||||
await (0,_upload_release_assets__WEBPACK_IMPORTED_MODULE_6__/* .uploadAssets */ .r)(releaseId, artifacts, _inputs__WEBPACK_IMPORTED_MODULE_5__/* .retryAttempts */ .z);
|
||||
if (_inputs__WEBPACK_IMPORTED_MODULE_5__/* .includeUpdaterJson */ .Sv) {
|
||||
if (_inputs__WEBPACK_IMPORTED_MODULE_5__/* .shouldUploadUpdaterJson */ .Qe) {
|
||||
// Once we start throwing our own errors in this function we may need some custom retry logic.
|
||||
// We can't retry just the inner asset upload as that may upload an outdated latest.json file.
|
||||
await (0,_utils__WEBPACK_IMPORTED_MODULE_9__/* .retry */ .L5)(() => (0,_upload_version_json__WEBPACK_IMPORTED_MODULE_7__/* .uploadVersionJSON */ .Y)(info.version, body, tagName, releaseId, artifacts, targetInfo, info.unzippedSigs),
|
||||
@@ -85386,7 +85386,6 @@ __nccwpck_require__.d(__webpack_exports__, {
|
||||
K4: () => (/* binding */ draft),
|
||||
yK: () => (/* binding */ generateReleaseNotes),
|
||||
qu: () => (/* binding */ githubBaseUrl),
|
||||
Sv: () => (/* binding */ includeUpdaterJson),
|
||||
m0: () => (/* binding */ isAndroid),
|
||||
_o: () => (/* binding */ isDebug),
|
||||
Hd: () => (/* binding */ isGitea),
|
||||
@@ -85400,6 +85399,7 @@ __nccwpck_require__.d(__webpack_exports__, {
|
||||
dw: () => (/* binding */ releaseAssetNamePattern),
|
||||
LB: () => (/* binding */ repo),
|
||||
z: () => (/* binding */ retryAttempts),
|
||||
Qe: () => (/* binding */ shouldUploadUpdaterJson),
|
||||
Jc: () => (/* binding */ shouldUploadWorkflowArtifacts),
|
||||
PK: () => (/* binding */ tauriScript),
|
||||
ZQ: () => (/* binding */ updaterJsonPreferNsis),
|
||||
@@ -85466,7 +85466,7 @@ function firstString() {
|
||||
|
||||
|
||||
const projectPath = (0,external_node_path_.resolve)(process.cwd(), core.getInput('projectPath') || process.argv[2]);
|
||||
const includeUpdaterJson = core.getBooleanInput('includeUpdaterJson');
|
||||
const shouldUploadUpdaterJson = core.getBooleanInput('uploadUpdaterJson');
|
||||
const retryAttempts = parseInt(core.getInput('retryAttempts') || '0', 10);
|
||||
const tauriScript = core.getInput('tauriScript') || undefined;
|
||||
const releaseAssetNamePattern = core.getInput('releaseAssetNamePattern') || undefined;
|
||||
|
||||
@@ -6,7 +6,7 @@ import * as core from '@actions/core';
|
||||
import { buildProject } from './build';
|
||||
import { getOrCreateRelease } from './create-release';
|
||||
import {
|
||||
includeUpdaterJson,
|
||||
shouldUploadUpdaterJson,
|
||||
isIOS,
|
||||
parsedArgs,
|
||||
retryAttempts,
|
||||
@@ -127,7 +127,7 @@ async function run(): Promise<void> {
|
||||
if (releaseId) {
|
||||
await uploadReleaseAssets(releaseId, artifacts, retryAttempts);
|
||||
|
||||
if (includeUpdaterJson) {
|
||||
if (shouldUploadUpdaterJson) {
|
||||
// Once we start throwing our own errors in this function we may need some custom retry logic.
|
||||
// We can't retry just the inner asset upload as that may upload an outdated latest.json file.
|
||||
await retry(
|
||||
|
||||
@@ -10,7 +10,8 @@ export const projectPath = resolve(
|
||||
core.getInput('projectPath') || process.argv[2],
|
||||
);
|
||||
|
||||
export const includeUpdaterJson = core.getBooleanInput('includeUpdaterJson');
|
||||
export const shouldUploadUpdaterJson =
|
||||
core.getBooleanInput('uploadUpdaterJson');
|
||||
|
||||
export const retryAttempts = parseInt(
|
||||
core.getInput('retryAttempts') || '0',
|
||||
|
||||
Reference in New Issue
Block a user