This commit is contained in:
Thomas Deegan 2026-04-12 17:50:11 +08:00 committed by GitHub
commit f75493fa61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 28 additions and 3 deletions

10
dist/merge/index.js vendored
View file

@ -131863,7 +131863,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;

10
dist/upload/index.js vendored
View file

@ -130546,7 +130546,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;

View file

@ -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)