Skip to content

Commit

Permalink
docs: add secrets logic to ci (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhercher committed Jun 28, 2021
1 parent 63b47a4 commit 3c21ee5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ci/cloudbuild_pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ steps:
- 'TWINE_PASSWORD=${_TWINE_PASSWORD}'
- 'TWINE_REPOSITORY_URL=${_TWINE_REPOSITORY_URL}'
substitutions:
_TWINE_USERNAME: username
_TWINE_PASSWORD: password
_TWINE_USERNAME: __token__
_TWINE_PASSWORD:
_TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/
options:
substitution_option: 'ALLOW_LOOSE'
6 changes: 6 additions & 0 deletions ci/release_pypi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.


if [ "${TWINE_PASSWORD}" == "" ]
then
TWINE_PASSWORD=$(gcloud secrets versions access latest --secret="data-validation" --project=${PROJECT_ID})
fi

python3 -m pip install --upgrade build setuptools twine wheel
python3 -m build
python3 -m twine upload dist/*

0 comments on commit 3c21ee5

Please sign in to comment.