Only deploy on merges to master

This commit is contained in:
Byron Lathi
2024-06-06 18:55:01 -07:00
parent 6afcd8c60e
commit d40096a3a5

View File

@@ -27,8 +27,8 @@ deploy:
stage: deploy
rules:
# only run on MRs to main
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
# run on commits to main
- if: $CI_COMMIT_BRANCH == "main"
- if: $CI_COMMIT_BRANCH == "master"
script:
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${PACKAGE_PROJECT_ID}/packages/pypi dist/*