From 15633cf7d57c9cd53652df7e5f5f732d2ffd18db Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi Date: Tue, 14 Jan 2025 20:44:41 +0100 Subject: [PATCH] (#8) udpate ci --- .github/workflows/pypi-publish.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 88bfdfc..ec338b8 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -25,21 +25,21 @@ jobs: python -m pip install --upgrade pip pip install build twine - - name: Check commit message for '[deploy]' - id: check-deploy - run: | - if ! git log -1 --pretty=%B | grep -q '\[deploy\]'; then - echo "No [deploy] tag found in the commit message. Skipping deployment." - exit 0 - fi - + - name: Check commit message for '[deploy]' + id: check-deploy + run: | + if ! git log -1 --pretty=%B | grep -q '\[deploy\]'; then + echo "No [deploy] tag found in the commit message. Skipping deployment." + exit 0 + fi + - name: Build package - if: steps.check-deploy.outputs.result == 'true' + if: always() run: | python -m build --sdist --wheel --outdir dist/ - name: Publish to PyPI - if: steps.check-deploy.outputs.result == 'true' + if: success() && steps.check-deploy.outcome == 'success' run: | python -m twine upload \ --non-interactive \ @@ -48,4 +48,3 @@ jobs: env: TWINE_USERNAME: "__token__" TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} - \ No newline at end of file