From 1bd593cf4388e914156b49c3d3e6ad9d6900483f Mon Sep 17 00:00:00 2001 From: Viginum-DataScientist-6 <210390336+Viginum-DataScientist-6@users.noreply.github.com> Date: Wed, 30 Jul 2025 11:53:45 +0000 Subject: [PATCH] feat(ci): add guards for local debugging via nektos/act --- .github/workflows/publish-to-pypi.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 1f1e663..277b1df 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -5,6 +5,9 @@ on: release: types: [published] +env: + ACT: false # env.ACT == true when running inside nektos/act + jobs: build: name: Build distribution @@ -52,6 +55,8 @@ jobs: path: dist/ - run: gh release upload "${TAG_NAME}" dist/*.{tar.gz,whl} + # skip step when debugging locally via nektos/act + if: ${{ !env.ACT }} env: GH_TOKEN: ${{ github.token }} TAG_NAME: ${{ github.event.release.tag_name }} @@ -74,6 +79,8 @@ jobs: path: dist/ - name: Publish distribution to PyPI + # skip step when debugging locally via nektos/act + if: ${{ !env.ACT }} uses: pypa/gh-action-pypi-publish@release/v1 with: print-hash: true