{{> ciRelease}}

  smoke-publish:
    {{> jobMatrix
      jobName="Smoke Publish"
      jobCheck=(obj sha="inputs.check-sha")
      jobCheckout=(obj ref="${{ inputs.ref }}")
      windowsCI=false
    }}
      - name: Pack
        run: |
          NPM_VERSION="$({{ rootNpmPath }} --version)-$GITHUB_SHA.0"
          {{ rootNpmPath }} version $NPM_VERSION --ignore-scripts
          node scripts/publish.js --pack-destination=$RUNNER_TEMP
          {{ rootNpmPath }} install --global $RUNNER_TEMP/npm-$NPM_VERSION.tgz
          {{ rootNpmPath }} install -w smoke-tests --ignore-scripts --no-audit --no-fund
          node scripts/remove-files.js
          # call installed npm instead of local source since we are testing
          # the packed tarball that we just installed globally
          SMOKE_PUBLISH_NPM=1 npm test -w smoke-tests --ignore-scripts
      {{> stepChecks jobCheck=true }}
