parameters:
  vmImage:

jobs:
- job: Package
  dependsOn:
    - Test_Primary
    - Test_Secondary
  pool:
    vmImage: ${{ parameters.vmImage }}

  steps:
  - task: UsePythonVersion@0
    displayName: Use Python 3 latest
    inputs:
      versionSpec: '3'

  - bash: |
      git config --global user.email "pypa-dev@googlegroups.com"
      git config --global user.name "pip"
    displayName: Setup Git credentials

  - bash: pip install nox
    displayName: Install dependencies

  - bash: nox -s prepare-release -- 99.9
    displayName: Prepare dummy release

  - bash: nox -s build-release -- 99.9
    displayName: Generate distributions for the dummy release

  - task: PublishBuildArtifacts@1
    displayName: 'Publish Artifact: dist'
    inputs:
      pathtoPublish: dist
      artifactName: dist
