mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-23 03:18:07 +08:00
Restructuring
This commit is contained in:
29
packages/artifact/src/internal/upload/upload-artifact.ts
Normal file
29
packages/artifact/src/internal/upload/upload-artifact.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
import {checkArtifactName} from './path-and-artifact-name-validation'
|
||||
import {UploadOptions} from './upload-options'
|
||||
import {UploadResponse} from './upload-response'
|
||||
|
||||
export async function uploadArtifact(
|
||||
name: string,
|
||||
files: string[],
|
||||
rootDirectory: string,
|
||||
options?: UploadOptions | undefined
|
||||
): Promise<UploadResponse> {
|
||||
|
||||
// Need to keep checking the artifact name
|
||||
checkArtifactName(name)
|
||||
|
||||
// TODO Twirp call to create new artifact
|
||||
|
||||
// TODO Upload to blob storage using SAS URL
|
||||
|
||||
// TODO Twirp call to finalize the new artifact upload
|
||||
|
||||
const uploadResponse: UploadResponse = {
|
||||
artifactName: name,
|
||||
artifactItems: [],
|
||||
size: 0
|
||||
}
|
||||
|
||||
return uploadResponse
|
||||
}
|
||||
Reference in New Issue
Block a user