Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion dist/merge/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131843,7 +131843,15 @@ function getInputs() {

async function upload_artifact_uploadArtifact(artifactName, filesToUpload, rootDirectory, options) {
const uploadResponse = await lib_artifact.uploadArtifact(artifactName, filesToUpload, rootDirectory, options);
info(`Artifact ${artifactName} has been successfully uploaded! Final size is ${uploadResponse.size} bytes. Artifact ID is ${uploadResponse.id}`);
const size = uploadResponse.size;
const displaySize = size === undefined
? 'unknown'
: size >= 1024 * 1024
? `${(size / (1024 * 1024)).toFixed(2)} MB`
: size >= 1024
? `${(size / 1024).toFixed(2)} KB`
: `${size} bytes`;
info(`Artifact ${artifactName} has been successfully uploaded! Final size is ${displaySize}. Artifact ID is ${uploadResponse.id}`);
setOutput('artifact-id', uploadResponse.id);
setOutput('artifact-digest', uploadResponse.digest);
const repository = github_context.repo;
Expand Down
10 changes: 9 additions & 1 deletion dist/upload/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130526,7 +130526,15 @@ function getInputs() {

async function upload_artifact_uploadArtifact(artifactName, filesToUpload, rootDirectory, options) {
const uploadResponse = await artifact.uploadArtifact(artifactName, filesToUpload, rootDirectory, options);
info(`Artifact ${artifactName} has been successfully uploaded! Final size is ${uploadResponse.size} bytes. Artifact ID is ${uploadResponse.id}`);
const size = uploadResponse.size;
const displaySize = size === undefined
? 'unknown'
: size >= 1024 * 1024
? `${(size / (1024 * 1024)).toFixed(2)} MB`
: size >= 1024
? `${(size / 1024).toFixed(2)} KB`
: `${size} bytes`;
info(`Artifact ${artifactName} has been successfully uploaded! Final size is ${displaySize}. Artifact ID is ${uploadResponse.id}`);
setOutput('artifact-id', uploadResponse.id);
setOutput('artifact-digest', uploadResponse.digest);
const repository = github_context.repo;
Expand Down
11 changes: 10 additions & 1 deletion src/shared/upload-artifact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,17 @@ export async function uploadArtifact(
options
)

const size = uploadResponse.size
const displaySize =
size === undefined
? 'unknown'
: size >= 1024 * 1024
? `${(size / (1024 * 1024)).toFixed(2)} MB`
: size >= 1024
? `${(size / 1024).toFixed(2)} KB`
: `${size} bytes`
core.info(
`Artifact ${artifactName} has been successfully uploaded! Final size is ${uploadResponse.size} bytes. Artifact ID is ${uploadResponse.id}`
`Artifact ${artifactName} has been successfully uploaded! Final size is ${displaySize}. Artifact ID is ${uploadResponse.id}`
)
core.setOutput('artifact-id', uploadResponse.id)
core.setOutput('artifact-digest', uploadResponse.digest)
Expand Down