File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 13
13
- " master"
14
14
- " main"
15
15
release :
16
+ types : [published]
16
17
branches :
17
18
- " master"
18
19
- " main"
@@ -128,7 +129,7 @@ jobs:
128
129
deploy :
129
130
name : PyPi ${{ matrix.os }} Py${{ matrix.python-version }}
130
131
# Run only for tagged releases.
131
- if : github.event_name == 'release'
132
+ if : github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
132
133
runs-on : ${{ matrix.os }}
133
134
needs : [lint, test]
134
135
strategy :
@@ -162,15 +163,13 @@ jobs:
162
163
ls -l dist/
163
164
164
165
- name : Publish distribution 📦 to Test PyPI
165
- if : startsWith(github.ref, 'refs/tags')
166
166
uses : pypa/gh-action-pypi-publish@master
167
167
with :
168
168
password : ${{ secrets.test_pypi_password }}
169
169
repository_url : https://test.pypi.org/legacy/
170
170
skip_existing : true
171
171
172
172
- name : Publish distribution 📦 to PyPI
173
- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
174
173
uses : pypa/gh-action-pypi-publish@master
175
174
with :
176
175
password : ${{ secrets.pypi_password }}
You can’t perform that action at this time.
0 commit comments