Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ManasJayanth committed May 17, 2024
1 parent 05306cc commit 52a3baa
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function main() {
const installCacheKey = await cache.restoreCache(
installPath,
installKey,
[]
[],
);
if (installCacheKey) {
console.log("Restored the install cache");
Expand Down Expand Up @@ -70,7 +70,7 @@ async function main() {
const buildCacheKey = await cache.restoreCache(
depsPath,
buildKey,
restoreKeys
restoreKeys,
);
if (buildCacheKey) {
console.log("Restored the build cache");
Expand Down Expand Up @@ -113,7 +113,7 @@ async function prepareNPMArtifacts() {
const statusCmd = manifestKey ? `esy ${manifestKey} status` : "esy status";
try {
const manifestFilePath = JSON.parse(
cp.execSync(statusCmd).toString()
cp.execSync(statusCmd).toString(),
).rootPackageConfigPath;
const manifest = JSON.parse(fs.readFileSync(manifestFilePath).toString());
if (manifest.esy.release) {
Expand All @@ -124,8 +124,10 @@ async function prepareNPMArtifacts() {
await compress("_release", tarFile);

const context = github.context;
const artifactName = `npm-${context.job.replace(" ", "_")}`;
console.log("Artifact name: ", artifactName);
const { id, size } = await artifact.uploadArtifact(
`npm-${context.job.replace(" ", "_")}`,
artifactName,
[tarFile],
process.env.GITHUB_WORKSPACE!,
{
Expand All @@ -138,7 +140,7 @@ async function prepareNPMArtifacts() {
// optional: how long to retain the artifact
// if unspecified, defaults to repository/org retention settings (the limit of this value)
retentionDays: 10,
}
},
);

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

0 comments on commit 52a3baa

Please sign in to comment.