Skip to content

Commit

Permalink
Bump to 0.9.58 and use proper suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianrath committed May 24, 2024
1 parent 9deeaf4 commit 64f3c59
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
14 changes: 11 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36950,7 +36950,15 @@ const debugOutput = process.env.ACTIONS_STEP_DEBUG === 'true';
*/
function extractArchive(archivePath) {
return __awaiter(this, void 0, void 0, function* () {
return archivePath.endsWith(".zip") ? tc.extractZip(archivePath) : tc.extractTar(archivePath);
if (archivePath.endsWith(".tar.gz")) {
return tc.extractTar(archivePath);
}
else if (archivePath.endsWith(".zip")) {
return tc.extractTar(archivePath, undefined, "x");
}
else {
throw new Error(`Unsupported archive format: ${archivePath}`);
}
});
}
exports.extractArchive = extractArchive;
Expand Down Expand Up @@ -37084,7 +37092,7 @@ function run() {
}
const downloadInfo = {
downloadUrl: downloadUrl,
filename: `graph-runner-${os_1.default.platform()}-${os_1.default.arch()}`,
filename: `graph-runner-${os_1.default.platform()}-${os_1.default.arch()}.zip`,
};
runnerPath = yield downloadRunner(downloadInfo, runnerBaseUrl ? null : token, runnerBaseUrl ? false : true);
}
Expand Down Expand Up @@ -46404,7 +46412,7 @@ const got = source_create(defaults);
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('{"name":"action","version":"0.9.56","description":"","main":"dist/index.js","scripts":{"build":"tsc && ncc build src/main.ts -o dist","test":"echo \\"Error: no test specified\\" && exit 1","lint":"eslint src"},"keywords":["github","actions","workflows","node","graph"],"repository":{"type":"git","url":"git+https://github.com/actionforge/action.git"},"author":"Actionforge","license":"Actionforge Community License","bugs":{"url":"https://github.com/actionforge/action/issues"},"homepage":"https://github.com/actionforge/action#readme","dependencies":{"@actions/core":"^1.10.1","@actions/github":"^6.0.0","@actions/tool-cache":"^2.0.1","@octokit/action":"^7.0.0","got":"^14.3.0"},"devDependencies":{"@types/got":"^9.6.12","@types/node":"^20.12.12","@typescript-eslint/eslint-plugin":"^7.10.0","@typescript-eslint/parser":"^7.10.0","@vercel/ncc":"^0.38.1","eslint":"^8.56.0","typescript":"^5.4.5"}}');
module.exports = JSON.parse('{"name":"action","version":"0.9.58","description":"","main":"dist/index.js","scripts":{"build":"tsc && ncc build src/main.ts -o dist","test":"echo \\"Error: no test specified\\" && exit 1","lint":"eslint src"},"keywords":["github","actions","workflows","node","graph"],"repository":{"type":"git","url":"git+https://github.com/actionforge/action.git"},"author":"Actionforge","license":"Actionforge Community License","bugs":{"url":"https://github.com/actionforge/action/issues"},"homepage":"https://github.com/actionforge/action#readme","dependencies":{"@actions/core":"^1.10.1","@actions/github":"^6.0.0","@actions/tool-cache":"^2.0.1","@octokit/action":"^7.0.0","got":"^14.3.0"},"devDependencies":{"@types/got":"^9.6.12","@types/node":"^20.12.12","@typescript-eslint/eslint-plugin":"^7.10.0","@typescript-eslint/parser":"^7.10.0","@vercel/ncc":"^0.38.1","eslint":"^8.56.0","typescript":"^5.4.5"}}');

/***/ }),

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "action",
"version": "0.9.56",
"version": "0.9.58",
"description": "",
"main": "dist/index.js",
"scripts": {
Expand Down
10 changes: 8 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ export interface IRunnerVersionInfo {
* @returns A Promise that resolves to the path of the extracted directory.
*/
export async function extractArchive(archivePath: string): Promise<string> {
return archivePath.endsWith(".zip") ? tc.extractZip(archivePath) : tc.extractTar(archivePath);
if (archivePath.endsWith(".tar.gz")) {
return tc.extractTar(archivePath);
} else if (archivePath.endsWith(".zip")) {
return tc.extractTar(archivePath, undefined, "x");
} else {
throw new Error(`Unsupported archive format: ${archivePath}`);
}
}

/**
Expand Down Expand Up @@ -202,7 +208,7 @@ async function run(): Promise<void> {

const downloadInfo = {
downloadUrl: downloadUrl,
filename: `graph-runner-${os.platform()}-${os.arch()}`,
filename: `graph-runner-${os.platform()}-${os.arch()}.zip`,
};

runnerPath = await downloadRunner(downloadInfo, runnerBaseUrl ? null : token, runnerBaseUrl ? false : true);
Expand Down

0 comments on commit 64f3c59

Please sign in to comment.