From 2eb13490583a4dc239fa24484ea59e7a09a34508 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Mon, 12 Sep 2022 17:37:52 +0200 Subject: [PATCH] Skip build and deploy if no tag created --- .woodpecker/build.yml | 7 +++---- .woodpecker/deploy.yml | 7 +++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml index 8383dbf..2d1caa8 100644 --- a/.woodpecker/build.yml +++ b/.woodpecker/build.yml @@ -1,6 +1,9 @@ pipeline: build: image: python:latest + when: + event: tag + branch: [main, master] commands: - python --version - pip install -U virtualenv --quiet @@ -8,7 +11,3 @@ pipeline: - source venv/bin/activate - pip install -U build --quiet - build - - when: - event: tag - branch: [main, master] diff --git a/.woodpecker/deploy.yml b/.woodpecker/deploy.yml index 63de36a..b1cfcbb 100644 --- a/.woodpecker/deploy.yml +++ b/.woodpecker/deploy.yml @@ -1,6 +1,9 @@ pipeline: deploy: image: python:latest + when: + event: tag + branch: [main, master] commands: - python --version - pip install -U virtualenv --quiet @@ -9,5 +12,5 @@ pipeline: - pip install -U twine --quiet - twine upload --skip-existing --repository testpypi -u $TWINE_USERNAME -p $TWINE_PASSWORD dist/* - depends_on: - - build +depends_on: + - build