Skip to content

Commit 444f3af

Browse files
committed
wip
1 parent 3cfcfe4 commit 444f3af

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

dist/index.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180750,16 +180750,16 @@ function run(name, command, args) {
180750180750
function runEsyCommand(name, args) {
180751180751
return run(name, "esy", manifestKey ? [`@${manifestKey}`, ...args] : args);
180752180752
}
180753+
const index_platform = external_os_.platform();
180754+
const arch = external_os_.arch();
180753180755
function main() {
180754180756
return __awaiter(this, void 0, void 0, function* () {
180755180757
try {
180756180758
const workingDirectory = core.getInput("working-directory") || process.cwd();
180757180759
external_fs_.statSync(workingDirectory);
180758180760
process.chdir(workingDirectory);
180759-
const platform = external_os_.platform();
180760-
const arch = external_os_.arch();
180761180761
const installPath = ["~/.esy/source"];
180762-
const installKey = `source-${platform}-${arch}-${sourceCacheKey}`;
180762+
const installKey = `source-${index_platform}-${arch}-${sourceCacheKey}`;
180763180763
core.startGroup("Restoring install cache");
180764180764
const installCacheKey = yield cache.restoreCache(installPath, installKey, []);
180765180765
if (installCacheKey) {
@@ -180776,8 +180776,8 @@ function main() {
180776180776
.sort()
180777180777
.pop();
180778180778
const depsPath = [external_path_.join(ESY_FOLDER, esy3, "i")];
180779-
const buildKey = `build-${platform}-${arch}-${cacheKey}`;
180780-
const restoreKeys = [`build-${platform}-${arch}-`, `build-`];
180779+
const buildKey = `build-${index_platform}-${arch}-${cacheKey}`;
180780+
const restoreKeys = [`build-${index_platform}-${arch}-`, `build-`];
180781180781
core.startGroup("Restoring build cache");
180782180782
const buildCacheKey = yield cache.restoreCache(depsPath, buildKey, restoreKeys);
180783180783
if (buildCacheKey) {
@@ -180829,7 +180829,9 @@ function prepareNPMArtifacts() {
180829180829
let tarFile = `npm-tarball.tgz`;
180830180830
yield compress("_release", tarFile);
180831180831
const context = github.context;
180832-
const { id, size } = yield artifact.uploadArtifact(`npm-${context.job.replace(" ", "_")}`, [tarFile], process.env.GITHUB_WORKSPACE, {
180832+
const artifactName = `npm-${context.job.replace(" ", "_")}-${index_platform}-${arch}-${new Date().getTime()}`;
180833+
console.log("Artifact name: ", artifactName);
180834+
const { id, size } = yield artifact.uploadArtifact(artifactName, [tarFile], process.env.GITHUB_WORKSPACE, {
180833180835
// The level of compression for Zlib to be applied to the artifact archive.
180834180836
// - 0: No compression
180835180837
// - 1: Best speed

index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async function main() {
4242
const installCacheKey = await cache.restoreCache(
4343
installPath,
4444
installKey,
45-
[],
45+
[]
4646
);
4747
if (installCacheKey) {
4848
console.log("Restored the install cache");
@@ -70,7 +70,7 @@ async function main() {
7070
const buildCacheKey = await cache.restoreCache(
7171
depsPath,
7272
buildKey,
73-
restoreKeys,
73+
restoreKeys
7474
);
7575
if (buildCacheKey) {
7676
console.log("Restored the build cache");
@@ -113,7 +113,7 @@ async function prepareNPMArtifacts() {
113113
const statusCmd = manifestKey ? `esy ${manifestKey} status` : "esy status";
114114
try {
115115
const manifestFilePath = JSON.parse(
116-
cp.execSync(statusCmd).toString(),
116+
cp.execSync(statusCmd).toString()
117117
).rootPackageConfigPath;
118118
const manifest = JSON.parse(fs.readFileSync(manifestFilePath).toString());
119119
if (manifest.esy.release) {
@@ -126,7 +126,7 @@ async function prepareNPMArtifacts() {
126126
const context = github.context;
127127
const artifactName = `npm-${context.job.replace(
128128
" ",
129-
"_",
129+
"_"
130130
)}-${platform}-${arch}-${new Date().getTime()}`;
131131
console.log("Artifact name: ", artifactName);
132132
const { id, size } = await artifact.uploadArtifact(
@@ -143,7 +143,7 @@ async function prepareNPMArtifacts() {
143143
// optional: how long to retain the artifact
144144
// if unspecified, defaults to repository/org retention settings (the limit of this value)
145145
retentionDays: 10,
146-
},
146+
}
147147
);
148148

149149
console.log(`Created artifact with id: ${id} (bytes: ${size}`);

0 commit comments

Comments
 (0)