Skip to content

Fix pypi version #766

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: 📦 Packaging release to PyPI
on:
workflow_dispatch:
pull_request:
branches: [main]
release:
types: [published]

Expand All @@ -13,14 +15,17 @@ jobs:
uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-python@v4
fetch-depth: 0

- name: Build SDist and Wheel
run: pipx run build --sdist --wheel

- uses: actions/upload-artifact@v3
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
- name: Install dependencies
run: python3 -m pip install --user --upgrade setuptools wheel
- name: Build package
run: python3 setup.py sdist bdist_wheel
path: dist/*.*

- name: Publish 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_PASSWORD }}