Skip to content

Commit 529f9e9

Browse files
authored
Fix pypi version (#766)
* Update pypi-publish.yml * Update pypi-publish.yml * Update pypi-publish.yml * Update pypi-publish.yml * Update pypi-publish.yml * Update pypi-publish.yml * precommit * update
1 parent 6966993 commit 529f9e9

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: 📦 Packaging release to PyPI
22
on:
33
workflow_dispatch:
4+
pull_request:
5+
branches: [main]
46
release:
57
types: [published]
68

@@ -13,14 +15,17 @@ jobs:
1315
uses: actions/checkout@v3
1416
with:
1517
submodules: recursive
16-
- uses: actions/setup-python@v4
18+
fetch-depth: 0
19+
20+
- name: Build SDist and Wheel
21+
run: pipx run build --sdist --wheel
22+
23+
- uses: actions/upload-artifact@v3
1724
with:
18-
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
19-
- name: Install dependencies
20-
run: python3 -m pip install --user --upgrade setuptools wheel
21-
- name: Build package
22-
run: python3 setup.py sdist bdist_wheel
25+
path: dist/*.*
26+
2327
- name: Publish 📦 to PyPI
24-
uses: pypa/gh-action-pypi-publish@master
28+
if: startsWith(github.ref, 'refs/tags')
29+
uses: pypa/gh-action-pypi-publish@release/v1
2530
with:
2631
password: ${{ secrets.PYPI_PASSWORD }}

0 commit comments

Comments
 (0)