---
steps:
- checkout: self

- template: ../tasks/DownloadPipelineArtifact.yml
  parameters:
    displayName: 'Downloading unsigned_osx-x64_binaries'
    path: '$(Pipeline.Workspace)/Artifacts' 
    artifact: 'unsigned_osx-x64_binaries'

- script: |
    echo "#[command] codesign -s - -f --entitlements $(Build.SourcesDirectory)/eng/Signing/macOS/debugger-entitlements.plist $(Pipeline.Workspace)/Artifacts/OpenDebugAD7"
    codesign -s - -f --entitlements $(Build.SourcesDirectory)/eng/Signing/macOS/debugger-entitlements.plist $(Pipeline.Workspace)/Artifacts/OpenDebugAD7

    echo "#[command] zip -r $(Pipeline.Workspace)/osx-x64.zip $(Pipeline.Workspace)/Artifacts/"
    zip -r $(Pipeline.Workspace)/osx-x64.zip $(Pipeline.Workspace)/Artifacts/

- template: ../tasks/PublishPipelineArtifact.yml
  parameters:
    displayName: 'Publish Binaries'
    path: '$(Pipeline.Workspace)/osx-x64.zip'
    artifactName: 'unsigned_osx-x64_zip'
...
---
steps:
- checkout: self

- template: ../tasks/DownloadPipelineArtifact.yml
  parameters:
    displayName: 'Downloading unsigned_osx-x64_binaries'
    path: '$(Pipeline.Workspace)/Artifacts' 
    artifact: 'unsigned_osx-x64_binaries'

- script: |
    echo "#[command] codesign -s - -f --entitlements $(Build.SourcesDirectory)/eng/Signing/macOS/debugger-entitlements.plist $(Pipeline.Workspace)/Artifacts/OpenDebugAD7"
    codesign -s - -f --entitlements $(Build.SourcesDirectory)/eng/Signing/macOS/debugger-entitlements.plist $(Pipeline.Workspace)/Artifacts/OpenDebugAD7
    
    echo "#[command] cd $(Pipeline.Workspace)/Artifacts/"
    cd $(Pipeline.Workspace)/Artifacts/

    echo "#[command] zip -r $(Pipeline.Workspace)/osx-x64.zip *"
    zip -r $(Pipeline.Workspace)/osx-x64.zip *

- template: ../tasks/PublishPipelineArtifact.yml
  parameters:
    displayName: 'Publish Binaries'
    path: '$(Pipeline.Workspace)/osx-x64.zip'
    artifactName: 'unsigned_osx-x64_zip'
...

Fix macOS publishing: zip without absolute paths
Fix macOS publishing: zip without absolute paths

Zip using `*` after `cd $(Pipeline.Workspace)/Artifacts/` to prevent full paths appearing in the zip.

Before it would produce:
`osx-x64.zip\Users\runner\work\1\Artifacts\OpenDebugAD7`

we want:
`osx-x64.zip\OpenDebugAD7`