From ccc0e99ff4a3893bea632bfb096310a85f6b5570 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Wed, 17 Apr 2024 16:22:07 -0500 Subject: [PATCH] Add required id_tokens --- ... cookiecutter.__ci=='gitlab' %}.gitlab-ci.yml{% endif %} | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/{{cookiecutter.project_name}}/{% if cookiecutter.__ci=='gitlab' %}.gitlab-ci.yml{% endif %} b/{{cookiecutter.project_name}}/{% if cookiecutter.__ci=='gitlab' %}.gitlab-ci.yml{% endif %} index fff26c35..3d6fea47 100644 --- a/{{cookiecutter.project_name}}/{% if cookiecutter.__ci=='gitlab' %}.gitlab-ci.yml{% endif %} +++ b/{{cookiecutter.project_name}}/{% if cookiecutter.__ci=='gitlab' %}.gitlab-ci.yml{% endif %} @@ -164,6 +164,9 @@ deploy_staging: rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push" + id_tokens: + PYPI_ID_TOKEN: + aud: testpypi variables: TWINE_REPOSITORY: testpypi TWINE_USERNAME: __token__ @@ -173,6 +176,9 @@ deploy_production: extends: .deploy only: - tags + id_tokens: + PYPI_ID_TOKEN: + aud: pypi variables: TWINE_REPOSITORY: pypi TWINE_USERNAME: __token__