parameters:
  cuVer: ''
  cudaVer: ''

steps:
- task: AmazonWebServices.aws-vsts-tools.S3Upload.S3Upload@1
  displayName: 'Upload ${{ parameters.cuVer }} wheel to S3'
  inputs:
    awsCredentials: 'Pytorch S3 bucket'
    bucketName: 'pytorch'
    sourceFolder: 'windows/output'
    globExpressions: '*.whl'
    targetFolder: 'whl/nightly/${{ parameters.cuVer }}/'
    filesAcl: 'public-read'
    flattenFolders: 'true'

- task: AmazonWebServices.aws-vsts-tools.S3Upload.S3Upload@1
  displayName: 'Upload ${{ parameters.cuVer }} libtorch to S3'
  inputs:
    awsCredentials: 'Pytorch S3 bucket'
    bucketName: 'pytorch'
    sourceFolder: 'windows/output'
    globExpressions: '*.zip'
    targetFolder: 'libtorch/nightly/${{ parameters.cuVer }}/'
    filesAcl: 'public-read'
    flattenFolders: 'true'
