Skip to content

Commit

Permalink
Fix pypi version (fastmachinelearning#766)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jmduarte authored Apr 15, 2023
1 parent 6966993 commit 529f9e9
Showing 1 changed file with 12 additions and 7 deletions.
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 }}

0 comments on commit 529f9e9

Please sign in to comment.