Skip to content

Commit 4ba15e8

Browse files
authored
Deploy to PyPI only when a release is created (#417)
1 parent 6340ae4 commit 4ba15e8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/python_publish.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# This workflow will upload a Python Package using Twine when a release is created.
22
# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
# CAUTION: Renaming this file will break Trusted Publishing to PyPI.
5+
# https://github.com/pypa/gh-action-pypi-publish
6+
37
name: CI
48

59
on:
@@ -100,7 +104,7 @@ jobs:
100104
url: https://pypi.org/p/pyttsx3
101105
permissions:
102106
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
103-
# if: github.event_name == 'release' && github.event.action == 'created' # Only on release creation
107+
if: github.event_name == 'release' && github.event.action == 'created' # Only on release creation
104108

105109
steps:
106110
- name: Download dist

0 commit comments

Comments
 (0)