Skip to content

Commit 8506065

Browse files
fix: fix template github action
1 parent 32b2e86 commit 8506065

File tree

1 file changed

+7
-1
lines changed
  • repo_scaffold/templates/template-python/{{cookiecutter.project_slug}}/.github/workflows

1 file changed

+7
-1
lines changed

repo_scaffold/templates/template-python/{{cookiecutter.project_slug}}/.github/workflows/package-release.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
publish-pypi:
3232
needs: test
3333
runs-on: ubuntu-latest
34+
if: vars.PUBLISH_TO_PUBLIC_PYPI == 'true'
3435
permissions:
3536
contents: write
3637
id-token: write
@@ -67,7 +68,12 @@ jobs:
6768
run: task deploy:pypi-server
6869

6970
release:
70-
needs: [test, publish-pypi, publish-private-pypi]
71+
needs: [test, publish-private-pypi, publish-pypi]
72+
{% raw %}if: |
73+
${{ always() &&
74+
needs.test.result == 'success' &&
75+
needs.publish-private-pypi.result == 'success' &&
76+
(needs.publish-pypi.result == 'success' || needs.publish-pypi.result == 'skipped') }}{% endraw %}
7177
runs-on: ubuntu-latest
7278
permissions:
7379
contents: write

0 commit comments

Comments
 (0)