diff --git a/packages/artifact/__tests__/upload-artifact.test.ts b/packages/artifact/__tests__/upload-artifact.test.ts index 9865815dc7..0edbc1a77a 100644 --- a/packages/artifact/__tests__/upload-artifact.test.ts +++ b/packages/artifact/__tests__/upload-artifact.test.ts @@ -589,7 +589,7 @@ describe('upload-artifact', () => { ) }) - it('should use the file basename as artifact name when skipArchive is true', async () => { + it('should use the artifact name as well when skipArchive is true', async () => { jest .spyOn(uploadZipSpecification, 'getUploadZipSpecification') .mockRestore() @@ -643,10 +643,10 @@ describe('upload-artifact', () => { {skipArchive: true} ) - // Verify CreateArtifact was called with the file basename, not the original name + // Verify CreateArtifact was called with the original name expect(createArtifactSpy).toHaveBeenCalledWith( expect.objectContaining({ - name: 'file1.txt' + name: 'original-name' }) ) }) diff --git a/packages/artifact/src/internal/upload/upload-artifact.ts b/packages/artifact/src/internal/upload/upload-artifact.ts index c7a6e60b75..984dee6f82 100644 --- a/packages/artifact/src/internal/upload/upload-artifact.ts +++ b/packages/artifact/src/internal/upload/upload-artifact.ts @@ -48,7 +48,6 @@ export async function uploadArtifact( } artifactFileName = path.basename(files[0]) - name = artifactFileName } validateArtifactName(name)