Skip to content

Commit 64f6b49

Browse files
Merge pull request #91 from neutrinoceros/fix_cd
REL: fix auto-publish workflow
2 parents 10a0c35 + 3fbe860 commit 64f6b49

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/cd.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: CD
22
on:
33
push:
44
tags: v*
5+
pull_request:
6+
paths:
7+
- .github/workflows/cd.yml
58
jobs:
69
publish:
710
runs-on: ubuntu-latest
@@ -13,12 +16,13 @@ jobs:
1316
with:
1417
python-version: '3.10'
1518
- name: Install build dependencies
16-
run: python3 -m pip install build wheel
19+
run: python -m pip install build wheel
1720
- name: Build distributions
1821
shell: bash -l {0}
19-
run: python setup.py sdist bdist_wheel
22+
run: python -m build
2023
- name: Publish package to PyPI
21-
uses: pypa/gh-action-pypi-publish@v1.4.2
24+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
25+
uses: pypa/gh-action-pypi-publish@v1.6.4
2226
with:
2327
user: __token__
2428
password: ${{ secrets.pypi_token }}

0 commit comments

Comments
 (0)