On Azure DevOps, I have some files I want to publish:
$(Build.ArtifactStagingDirectory)/dist/app/index.html
$(Build.ArtifactStagingDirectory)/dist/app/bundle.js
I want to publish them into an artifact app.zip
which contains, at the root level:
- index.html
- bundle.js
However when I use the "Publish Build Artifacts" tasks with the path set to $(Build.ArtifactStagingDirectory)/dist/app
, I get the following contents in app.zip
:
app/
index.html
bundle.js
I tried setting the publish path to:
$(Build.ArtifactStagingDirectory)/dist/app/**
$(Build.ArtifactStagingDirectory)/dist/app/*
$(Build.ArtifactStagingDirectory)/dist/app/*.*
but all of these fail the build with the error Not found PathtoPublish