mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-06-15 04:26:48 -07:00
feat(cli): add release workflow, install scripts, and self-update command
Replace the npm-only publish-cli.yml with a comprehensive release-cli.yml that builds standalone binaries via pkg for all platforms (Linux/macOS/Windows, x64/arm64), uploads them as GitHub Release assets with SHA256 checksums, and retains npm publish as an optional job. Add curl-pipe-sh installer (install.sh) and PowerShell installer (install.ps1) for one-liner installation from GitHub Releases. Both scripts auto-detect platform/architecture, verify checksums, and guide PATH configuration. Add `game-ci update` command for self-updating standalone binaries: checks GitHub releases for newer versions, downloads the correct platform binary, verifies it, and atomically replaces the running executable. Distribution strategy: GitHub Releases (primary), npm (optional), with winget/Homebrew/Chocolatey/Scoop as future providers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+268
-268
@@ -255724,121 +255724,6 @@ var isArray = Array.isArray || function (xs) {
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 95898:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
var __webpack_unused_export__;
|
||||
// Copyright Joyent, Inc. and other Node contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
// persons to whom the Software is furnished to do so, subject to the
|
||||
// following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// NOTE: These type checking functions intentionally don't use `instanceof`
|
||||
// because it is fragile and can be easily faked with `Object.create()`.
|
||||
|
||||
function isArray(arg) {
|
||||
if (Array.isArray) {
|
||||
return Array.isArray(arg);
|
||||
}
|
||||
return objectToString(arg) === '[object Array]';
|
||||
}
|
||||
__webpack_unused_export__ = isArray;
|
||||
|
||||
function isBoolean(arg) {
|
||||
return typeof arg === 'boolean';
|
||||
}
|
||||
__webpack_unused_export__ = isBoolean;
|
||||
|
||||
function isNull(arg) {
|
||||
return arg === null;
|
||||
}
|
||||
__webpack_unused_export__ = isNull;
|
||||
|
||||
function isNullOrUndefined(arg) {
|
||||
return arg == null;
|
||||
}
|
||||
__webpack_unused_export__ = isNullOrUndefined;
|
||||
|
||||
function isNumber(arg) {
|
||||
return typeof arg === 'number';
|
||||
}
|
||||
__webpack_unused_export__ = isNumber;
|
||||
|
||||
function isString(arg) {
|
||||
return typeof arg === 'string';
|
||||
}
|
||||
__webpack_unused_export__ = isString;
|
||||
|
||||
function isSymbol(arg) {
|
||||
return typeof arg === 'symbol';
|
||||
}
|
||||
__webpack_unused_export__ = isSymbol;
|
||||
|
||||
function isUndefined(arg) {
|
||||
return arg === void 0;
|
||||
}
|
||||
__webpack_unused_export__ = isUndefined;
|
||||
|
||||
function isRegExp(re) {
|
||||
return objectToString(re) === '[object RegExp]';
|
||||
}
|
||||
__webpack_unused_export__ = isRegExp;
|
||||
|
||||
function isObject(arg) {
|
||||
return typeof arg === 'object' && arg !== null;
|
||||
}
|
||||
__webpack_unused_export__ = isObject;
|
||||
|
||||
function isDate(d) {
|
||||
return objectToString(d) === '[object Date]';
|
||||
}
|
||||
__webpack_unused_export__ = isDate;
|
||||
|
||||
function isError(e) {
|
||||
return (objectToString(e) === '[object Error]' || e instanceof Error);
|
||||
}
|
||||
exports.VZ = isError;
|
||||
|
||||
function isFunction(arg) {
|
||||
return typeof arg === 'function';
|
||||
}
|
||||
__webpack_unused_export__ = isFunction;
|
||||
|
||||
function isPrimitive(arg) {
|
||||
return arg === null ||
|
||||
typeof arg === 'boolean' ||
|
||||
typeof arg === 'number' ||
|
||||
typeof arg === 'string' ||
|
||||
typeof arg === 'symbol' || // ES6 symbol
|
||||
typeof arg === 'undefined';
|
||||
}
|
||||
__webpack_unused_export__ = isPrimitive;
|
||||
|
||||
__webpack_unused_export__ = Buffer.isBuffer;
|
||||
|
||||
function objectToString(o) {
|
||||
return Object.prototype.toString.call(o);
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 19805:
|
||||
@@ -256225,6 +256110,157 @@ function resolveCommand(parsed) {
|
||||
module.exports = resolveCommand;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 82391:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
const {Transform, PassThrough} = __nccwpck_require__(12781);
|
||||
const zlib = __nccwpck_require__(59796);
|
||||
const mimicResponse = __nccwpck_require__(23877);
|
||||
|
||||
module.exports = response => {
|
||||
const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase();
|
||||
|
||||
if (!['gzip', 'deflate', 'br'].includes(contentEncoding)) {
|
||||
return response;
|
||||
}
|
||||
|
||||
// TODO: Remove this when targeting Node.js 12.
|
||||
const isBrotli = contentEncoding === 'br';
|
||||
if (isBrotli && typeof zlib.createBrotliDecompress !== 'function') {
|
||||
response.destroy(new Error('Brotli is not supported on Node.js < 12'));
|
||||
return response;
|
||||
}
|
||||
|
||||
let isEmpty = true;
|
||||
|
||||
const checker = new Transform({
|
||||
transform(data, _encoding, callback) {
|
||||
isEmpty = false;
|
||||
|
||||
callback(null, data);
|
||||
},
|
||||
|
||||
flush(callback) {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
|
||||
const finalStream = new PassThrough({
|
||||
autoDestroy: false,
|
||||
destroy(error, callback) {
|
||||
response.destroy();
|
||||
|
||||
callback(error);
|
||||
}
|
||||
});
|
||||
|
||||
const decompressStream = isBrotli ? zlib.createBrotliDecompress() : zlib.createUnzip();
|
||||
|
||||
decompressStream.once('error', error => {
|
||||
if (isEmpty && !response.readable) {
|
||||
finalStream.end();
|
||||
return;
|
||||
}
|
||||
|
||||
finalStream.destroy(error);
|
||||
});
|
||||
|
||||
mimicResponse(response, finalStream);
|
||||
response.pipe(checker).pipe(decompressStream).pipe(finalStream);
|
||||
|
||||
return finalStream;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 23877:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
// We define these manually to ensure they're always copied
|
||||
// even if they would move up the prototype chain
|
||||
// https://nodejs.org/api/http.html#http_class_http_incomingmessage
|
||||
const knownProperties = [
|
||||
'aborted',
|
||||
'complete',
|
||||
'headers',
|
||||
'httpVersion',
|
||||
'httpVersionMinor',
|
||||
'httpVersionMajor',
|
||||
'method',
|
||||
'rawHeaders',
|
||||
'rawTrailers',
|
||||
'setTimeout',
|
||||
'socket',
|
||||
'statusCode',
|
||||
'statusMessage',
|
||||
'trailers',
|
||||
'url'
|
||||
];
|
||||
|
||||
module.exports = (fromStream, toStream) => {
|
||||
if (toStream._readableState.autoDestroy) {
|
||||
throw new Error('The second stream must have the `autoDestroy` option set to `false`');
|
||||
}
|
||||
|
||||
const fromProperties = new Set(Object.keys(fromStream).concat(knownProperties));
|
||||
|
||||
const properties = {};
|
||||
|
||||
for (const property of fromProperties) {
|
||||
// Don't overwrite existing properties.
|
||||
if (property in toStream) {
|
||||
continue;
|
||||
}
|
||||
|
||||
properties[property] = {
|
||||
get() {
|
||||
const value = fromStream[property];
|
||||
const isFunction = typeof value === 'function';
|
||||
|
||||
return isFunction ? value.bind(fromStream) : value;
|
||||
},
|
||||
set(value) {
|
||||
fromStream[property] = value;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: false
|
||||
};
|
||||
}
|
||||
|
||||
Object.defineProperties(toStream, properties);
|
||||
|
||||
fromStream.once('aborted', () => {
|
||||
toStream.destroy();
|
||||
|
||||
toStream.emit('aborted');
|
||||
});
|
||||
|
||||
fromStream.once('close', () => {
|
||||
if (fromStream.complete) {
|
||||
if (toStream.readable) {
|
||||
toStream.once('end', () => {
|
||||
toStream.emit('close');
|
||||
});
|
||||
} else {
|
||||
toStream.emit('close');
|
||||
}
|
||||
} else {
|
||||
toStream.emit('close');
|
||||
}
|
||||
});
|
||||
|
||||
return toStream;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 18611:
|
||||
@@ -263377,7 +263413,7 @@ const https = __nccwpck_require__(95687);
|
||||
const http_timer_1 = __nccwpck_require__(76234);
|
||||
const cacheable_lookup_1 = __nccwpck_require__(2286);
|
||||
const CacheableRequest = __nccwpck_require__(69016);
|
||||
const decompressResponse = __nccwpck_require__(22490);
|
||||
const decompressResponse = __nccwpck_require__(82391);
|
||||
// @ts-expect-error Missing types
|
||||
const http2wrapper = __nccwpck_require__(54645);
|
||||
const lowercaseKeys = __nccwpck_require__(9662);
|
||||
@@ -266576,72 +266612,6 @@ CacheableRequest.CacheError = class extends Error {
|
||||
module.exports = CacheableRequest;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 22490:
|
||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
const {Transform, PassThrough} = __nccwpck_require__(12781);
|
||||
const zlib = __nccwpck_require__(59796);
|
||||
const mimicResponse = __nccwpck_require__(35039);
|
||||
|
||||
module.exports = response => {
|
||||
const contentEncoding = (response.headers['content-encoding'] || '').toLowerCase();
|
||||
|
||||
if (!['gzip', 'deflate', 'br'].includes(contentEncoding)) {
|
||||
return response;
|
||||
}
|
||||
|
||||
// TODO: Remove this when targeting Node.js 12.
|
||||
const isBrotli = contentEncoding === 'br';
|
||||
if (isBrotli && typeof zlib.createBrotliDecompress !== 'function') {
|
||||
response.destroy(new Error('Brotli is not supported on Node.js < 12'));
|
||||
return response;
|
||||
}
|
||||
|
||||
let isEmpty = true;
|
||||
|
||||
const checker = new Transform({
|
||||
transform(data, _encoding, callback) {
|
||||
isEmpty = false;
|
||||
|
||||
callback(null, data);
|
||||
},
|
||||
|
||||
flush(callback) {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
|
||||
const finalStream = new PassThrough({
|
||||
autoDestroy: false,
|
||||
destroy(error, callback) {
|
||||
response.destroy();
|
||||
|
||||
callback(error);
|
||||
}
|
||||
});
|
||||
|
||||
const decompressStream = isBrotli ? zlib.createBrotliDecompress() : zlib.createUnzip();
|
||||
|
||||
decompressStream.once('error', error => {
|
||||
if (isEmpty && !response.readable) {
|
||||
finalStream.end();
|
||||
return;
|
||||
}
|
||||
|
||||
finalStream.destroy(error);
|
||||
});
|
||||
|
||||
mimicResponse(response, finalStream);
|
||||
response.pipe(checker).pipe(decompressStream).pipe(finalStream);
|
||||
|
||||
return finalStream;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 98183:
|
||||
@@ -267162,91 +267132,6 @@ class Keyv extends EventEmitter {
|
||||
module.exports = Keyv;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 35039:
|
||||
/***/ ((module) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
// We define these manually to ensure they're always copied
|
||||
// even if they would move up the prototype chain
|
||||
// https://nodejs.org/api/http.html#http_class_http_incomingmessage
|
||||
const knownProperties = [
|
||||
'aborted',
|
||||
'complete',
|
||||
'headers',
|
||||
'httpVersion',
|
||||
'httpVersionMinor',
|
||||
'httpVersionMajor',
|
||||
'method',
|
||||
'rawHeaders',
|
||||
'rawTrailers',
|
||||
'setTimeout',
|
||||
'socket',
|
||||
'statusCode',
|
||||
'statusMessage',
|
||||
'trailers',
|
||||
'url'
|
||||
];
|
||||
|
||||
module.exports = (fromStream, toStream) => {
|
||||
if (toStream._readableState.autoDestroy) {
|
||||
throw new Error('The second stream must have the `autoDestroy` option set to `false`');
|
||||
}
|
||||
|
||||
const fromProperties = new Set(Object.keys(fromStream).concat(knownProperties));
|
||||
|
||||
const properties = {};
|
||||
|
||||
for (const property of fromProperties) {
|
||||
// Don't overwrite existing properties.
|
||||
if (property in toStream) {
|
||||
continue;
|
||||
}
|
||||
|
||||
properties[property] = {
|
||||
get() {
|
||||
const value = fromStream[property];
|
||||
const isFunction = typeof value === 'function';
|
||||
|
||||
return isFunction ? value.bind(fromStream) : value;
|
||||
},
|
||||
set(value) {
|
||||
fromStream[property] = value;
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: false
|
||||
};
|
||||
}
|
||||
|
||||
Object.defineProperties(toStream, properties);
|
||||
|
||||
fromStream.once('aborted', () => {
|
||||
toStream.destroy();
|
||||
|
||||
toStream.emit('aborted');
|
||||
});
|
||||
|
||||
fromStream.once('close', () => {
|
||||
if (fromStream.complete) {
|
||||
if (toStream.readable) {
|
||||
toStream.once('end', () => {
|
||||
toStream.emit('close');
|
||||
});
|
||||
} else {
|
||||
toStream.emit('close');
|
||||
}
|
||||
} else {
|
||||
toStream.emit('close');
|
||||
}
|
||||
});
|
||||
|
||||
return toStream;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 88580:
|
||||
@@ -344521,7 +344406,7 @@ var mod_assertplus = __nccwpck_require__(66631);
|
||||
var mod_util = __nccwpck_require__(73837);
|
||||
|
||||
var mod_extsprintf = __nccwpck_require__(41508);
|
||||
var mod_isError = (__nccwpck_require__(95898)/* .isError */ .VZ);
|
||||
var mod_isError = (__nccwpck_require__(4630)/* .isError */ .VZ);
|
||||
var sprintf = mod_extsprintf.sprintf;
|
||||
|
||||
/*
|
||||
@@ -344966,6 +344851,121 @@ WError.prototype.cause = function we_cause(c)
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 4630:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
var __webpack_unused_export__;
|
||||
// Copyright Joyent, Inc. and other Node contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||
// copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
// persons to whom the Software is furnished to do so, subject to the
|
||||
// following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included
|
||||
// in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||||
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// NOTE: These type checking functions intentionally don't use `instanceof`
|
||||
// because it is fragile and can be easily faked with `Object.create()`.
|
||||
|
||||
function isArray(arg) {
|
||||
if (Array.isArray) {
|
||||
return Array.isArray(arg);
|
||||
}
|
||||
return objectToString(arg) === '[object Array]';
|
||||
}
|
||||
__webpack_unused_export__ = isArray;
|
||||
|
||||
function isBoolean(arg) {
|
||||
return typeof arg === 'boolean';
|
||||
}
|
||||
__webpack_unused_export__ = isBoolean;
|
||||
|
||||
function isNull(arg) {
|
||||
return arg === null;
|
||||
}
|
||||
__webpack_unused_export__ = isNull;
|
||||
|
||||
function isNullOrUndefined(arg) {
|
||||
return arg == null;
|
||||
}
|
||||
__webpack_unused_export__ = isNullOrUndefined;
|
||||
|
||||
function isNumber(arg) {
|
||||
return typeof arg === 'number';
|
||||
}
|
||||
__webpack_unused_export__ = isNumber;
|
||||
|
||||
function isString(arg) {
|
||||
return typeof arg === 'string';
|
||||
}
|
||||
__webpack_unused_export__ = isString;
|
||||
|
||||
function isSymbol(arg) {
|
||||
return typeof arg === 'symbol';
|
||||
}
|
||||
__webpack_unused_export__ = isSymbol;
|
||||
|
||||
function isUndefined(arg) {
|
||||
return arg === void 0;
|
||||
}
|
||||
__webpack_unused_export__ = isUndefined;
|
||||
|
||||
function isRegExp(re) {
|
||||
return objectToString(re) === '[object RegExp]';
|
||||
}
|
||||
__webpack_unused_export__ = isRegExp;
|
||||
|
||||
function isObject(arg) {
|
||||
return typeof arg === 'object' && arg !== null;
|
||||
}
|
||||
__webpack_unused_export__ = isObject;
|
||||
|
||||
function isDate(d) {
|
||||
return objectToString(d) === '[object Date]';
|
||||
}
|
||||
__webpack_unused_export__ = isDate;
|
||||
|
||||
function isError(e) {
|
||||
return (objectToString(e) === '[object Error]' || e instanceof Error);
|
||||
}
|
||||
exports.VZ = isError;
|
||||
|
||||
function isFunction(arg) {
|
||||
return typeof arg === 'function';
|
||||
}
|
||||
__webpack_unused_export__ = isFunction;
|
||||
|
||||
function isPrimitive(arg) {
|
||||
return arg === null ||
|
||||
typeof arg === 'boolean' ||
|
||||
typeof arg === 'number' ||
|
||||
typeof arg === 'string' ||
|
||||
typeof arg === 'symbol' || // ES6 symbol
|
||||
typeof arg === 'undefined';
|
||||
}
|
||||
__webpack_unused_export__ = isPrimitive;
|
||||
|
||||
__webpack_unused_export__ = Buffer.isBuffer;
|
||||
|
||||
function objectToString(o) {
|
||||
return Object.prototype.toString.call(o);
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 41508:
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user