Use uv from tool-cache to prune cache

This commit is contained in:
Kevin Stillhammer 2025-02-12 15:22:06 +01:00
parent f95cd8710c
commit 928a502318
No known key found for this signature in database
6 changed files with 32 additions and 4 deletions

5
dist/setup/index.js generated vendored
View file

@ -95331,6 +95331,7 @@ const inputs_1 = __nccwpck_require__(9612);
const exec = __importStar(__nccwpck_require__(5236));
const node_fs_1 = __importDefault(__nccwpck_require__(3024));
const pyproject_1 = __nccwpck_require__(3929);
const constants_1 = __nccwpck_require__(6156);
async function run() {
const platform = (0, platforms_1.getPlatform)();
const arch = (0, platforms_1.getArch)();
@ -95342,6 +95343,7 @@ async function run() {
throw new Error(`Unsupported architecture: ${process.arch}`);
}
const setupResult = await setupUv(platform, arch, inputs_1.checkSum, inputs_1.githubToken);
core.saveState(constants_1.STATE_CACHED_UV_DIR, setupResult.uvDir);
addUvToPath(setupResult.uvDir);
addToolBinToPath();
setToolDir();
@ -95463,10 +95465,11 @@ run();
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
exports.STATE_CACHED_UV_DIR = exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
exports.REPO = "uv";
exports.OWNER = "astral-sh";
exports.TOOL_CACHE_NAME = "uv";
exports.STATE_CACHED_UV_DIR = "cached-uv-dir";
/***/ }),