Skip to content

Commit

Permalink
wip: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgilman committed Sep 5, 2024
1 parent b092a8d commit d4b9669
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
17 changes: 14 additions & 3 deletions forge/actions/release/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30467,11 +30467,22 @@ async function run() {
return;
}

const archiveName = `${project}-${platform}.tar.gz`;
const archiveName = "";
if (gitTag.split("/").length > 1) {
const prefix = gitTag
.split("/")
.slice(0, -1)
.join("/")
.replace(/\//, "-");
archiveName = `${prefix}-${platform}.tar.gz`;
} else {
archiveName = `${github.context.repo.repo}-${platform}.tar.gz`;
}

core.info(`Creating archive ${archiveName}`);
await archive(archiveName, path);

const releaseName = `${project}-${gitTag}`;
const releaseName = gitTag;
const octokit = github.getOctokit(token);

core.info(`Creating release ${releaseName}`);
Expand All @@ -30494,7 +30505,7 @@ async function run() {
mediaType: {
format: "application/gzip",
},
data: `@${archiveName}`,
data: (__nccwpck_require__(7147).readFileSync)(archiveName),
});
} catch (error) {
core.setFailed(error.message);
Expand Down
2 changes: 1 addition & 1 deletion forge/actions/release/dist/index.js.map

Large diffs are not rendered by default.

17 changes: 14 additions & 3 deletions forge/actions/release/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,22 @@ async function run() {
return;
}

const archiveName = `${project}-${platform}.tar.gz`;
const archiveName = "";
if (gitTag.split("/").length > 1) {
const prefix = gitTag
.split("/")
.slice(0, -1)
.join("/")
.replace(/\//, "-");
archiveName = `${prefix}-${platform}.tar.gz`;
} else {
archiveName = `${github.context.repo.repo}-${platform}.tar.gz`;
}

core.info(`Creating archive ${archiveName}`);
await archive(archiveName, path);

const releaseName = `${project}-${gitTag}`;
const releaseName = gitTag;
const octokit = github.getOctokit(token);

core.info(`Creating release ${releaseName}`);
Expand All @@ -57,7 +68,7 @@ async function run() {
mediaType: {
format: "application/gzip",
},
data: `@${archiveName}`,
data: require("fs").readFileSync(archiveName),
});
} catch (error) {
core.setFailed(error.message);
Expand Down

0 comments on commit d4b9669

Please sign in to comment.