diff --git a/packages/artifact/src/internal/download/download-artifact.ts b/packages/artifact/src/internal/download/download-artifact.ts index a799539e..c8bf2cd3 100644 --- a/packages/artifact/src/internal/download/download-artifact.ts +++ b/packages/artifact/src/internal/download/download-artifact.ts @@ -56,8 +56,8 @@ export async function downloadArtifact( options?: DownloadArtifactOptions ): Promise { let downloadPath = options?.path || getGitHubWorkspaceDir() - if (options?.createArtifactFolder) { - downloadPath = path.join(downloadPath, 'my-artifact') // TODO: need to pass artifact name + if (options?.createArtifactFolderName) { + downloadPath = path.join(downloadPath, options?.createArtifactFolderName) } if (!(await exists(downloadPath))) { diff --git a/packages/artifact/src/internal/shared/interfaces.ts b/packages/artifact/src/internal/shared/interfaces.ts index 4f9a5c43..d8132d7b 100644 --- a/packages/artifact/src/internal/shared/interfaces.ts +++ b/packages/artifact/src/internal/shared/interfaces.ts @@ -93,10 +93,10 @@ export interface DownloadArtifactOptions { path?: string /** - * Specifies if a root folder with the artifact name is created for the artifact that is downloaded - * Zip contents are expanded into this folder. Defaults to false if not specified + * Specifies if a root folder with the given name is created for the artifact that is downloaded + * Zip contents are expanded into this folder. A folder will not be created if not specified. * */ - createArtifactFolder?: boolean + createArtifactFolderName?: string } /*****************************************************************************