From c77bd6046f62ed082b8536c662ac3cdfce456ba4 Mon Sep 17 00:00:00 2001 From: donal mee Date: Mon, 2 Jun 2025 16:10:01 +0100 Subject: [PATCH 1/2] chore: only run publish on the master branch --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 94af0a31..af25ca59 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -148,7 +148,7 @@ workflows: - publish: filters: branches: - ignore: /.*/ + only: master tags: only: /^v.*/ name: pypi From 9f6aac3ac2ecc6f8003130051808bfed7d48bc65 Mon Sep 17 00:00:00 2001 From: donal mee Date: Mon, 2 Jun 2025 16:59:07 +0100 Subject: [PATCH 2/2] chore: only run publish on the master branch --- .circleci/config.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index af25ca59..ec08afb9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,10 +21,15 @@ jobs: type: string steps: - checkout - - run: pip install --user --upgrade setuptools twine wheel - - run: | - python setup.py sdist bdist_wheel - twine upload --repository-url <> --username <> --password <> --verbose dist/* + - when: + condition: + equal: [ master, << pipeline.git.branch >> ] + steps: + - run: pip install --user --upgrade setuptools twine wheel + - run: | + "$CIRCLE_BRANCH" == "master" && echo "Publishing to PyPI" || echo "Publishing to Cloudsmith" + python setup.py sdist bdist_wheel + twine upload --repository-url <> --username <> --password <> --verbose dist/* orbs: python: circleci/python@2.1.1 @@ -148,7 +153,7 @@ workflows: - publish: filters: branches: - only: master + ignore: /.*/ tags: only: /^v.*/ name: pypi