Skip to content

Commit 2bd60f0

Browse files
committed
use 'created' type in CI for publishing to pypi
1 parent e0b3872 commit 2bd60f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/python-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name: Upload Python Package
1010

1111
on:
1212
release:
13-
types: [published]
13+
types: [created]
1414
workflow_dispatch:
1515

1616
permissions:
@@ -43,7 +43,7 @@ jobs:
4343
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
4444
run: twine upload --repository testpypi dist/*
4545
- name: Publish package (to PyPI)
46-
if: github.event_name != 'workflow_dispatch' && github.repository == 'cpp-linter/clang-tools-pip' && github.ref == 'refs/heads/main'
46+
if: github.event_name == 'created' && github.repository == 'cpp-linter/clang-tools-pip' && github.ref == 'refs/heads/main'
4747
env:
4848
TWINE_USERNAME: __token__
4949
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)