# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

timeout: 7200s
steps:
- id: release
  name: 'gcr.io/cloud-devrel-public-resources/python-multi'
  args: ['bash', './ci/release_pypi.sh']
  env:
  - 'BUILD=$BUILD_ID'
  - 'TWINE_USERNAME=${_TWINE_USERNAME}'
  - 'TWINE_PASSWORD=${_TWINE_PASSWORD}'
  - 'TWINE_REPOSITORY_URL=${_TWINE_REPOSITORY_URL}'
  - 'PROJECT_ID=${_PROJECT_ID}'
substitutions:
  _PROJECT_ID: pso-kokoro-resources
  _TWINE_USERNAME: __token__
  _TWINE_PASSWORD:
  _TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/
options:
  substitution_option: 'ALLOW_LOOSE'
