title: Azure Devops: Universal Publish uploads 0 mb
body: <p>What's the best way to verify that a universal publish task actually uploads an artifact &gt; 0mb, instead of an empty artifact?</p>
  <p>For example, I had a job that was downloading a pipeline artifact from a previous job, then checking for various criteria, then uploading the previous job's artifact as a universal package. Due to a misfire on my part, the artifact was getting downloaded to the workspace, but the publish was pulling from the artifact staging directory. I caught that when I was less tired but with the way you can't overwrite any previously published packages with a version that's already set, now I've got to clean up some clutter. I'd like to avoid this pain in the future.</p>
  <pre><code>- job: &quot;releasepublish&quot;
      dependsOn: 
        - &quot;cicd&quot;
      condition: startsWith(variables['build.sourceBranch'], 'refs/heads/release')
      variables: 
        outputVersion: $[ dependencies.cicd.outputs['windows.VersionNumber.appVersion'] ] 
      steps:
        - task: DownloadPipelineArtifact@2
          inputs:
            buildType: 'current'
            targetPath: '$(Pipeline.Workspace)'
        - task: UniversalPackages@0
          inputs:
            command: 'publish'
            publishDirectory: '$(Build.ArtifactStagingDirectory)'
            feedsToUsePublish: 'internal'
            vstsFeedPublish: '...'
            vstsFeedPackagePublish: '$(Build.SourceBranchName)'
            versionOption: 'custom'
            versionPublish: '$(outputVersion)'
            packagePublishDescription: 'master branch release $(outputVersion) for $(Build.SourceBranchName)'
  </code></pre>
  <p>the saddest success message in the world:</p>
  <pre><code>2021-03-09T14:49:27.2499973Z {&quot;@t&quot;:&quot;2021-03-09T14:49:26.6123086Z&quot;,&quot;@m&quot;:&quot;\n
  Content upload statistics:\n
  Total Content: 0.0 MB\n
  Physical Content Uploaded: 0.0 MB\n
  Logical Content Uploaded: 0.0 MB\n
  Compression Saved: 0.0 MB\nDeduplication Saved: 0.0 MB\n
  Number of Chunks Uploaded: 0\n
  Total Number of Chunks: 1\n
  &quot;,&quot;@i&quot;:&quot;13d73b85&quot;,&quot;SourceContext&quot;:&quot;ArtifactTool.Commands.UPackPublishCommand&quot;,&quot;UtcTimestamp&quot;:&quot;2021-03-09 14:49:26.612Z&quot;}
  ...
  2021-03-09T14:49:27.2504559Z {&quot;@t&quot;:&quot;2021-03-09T14:49:27.2346667Z&quot;,&quot;@m&quot;:&quot;Success&quot;,&quot;@i&quot;:&quot;1d9af52f&quot;,&quot;SourceContext&quot;:&quot;ArtifactTool.Commands.UPackPublishCommand&quot;,&quot;UtcTimestamp&quot;:&quot;2021-03-09 14:49:27.234Z&quot;}
  </code></pre>
  <p>(tangentially, if you've got recs for handling node app package versions and azure artifacts versions, I'm all ears for better practice)</p>