Skip to content

Commit

Permalink
build and publish
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Mar 17, 2024
1 parent a94f567 commit e21d65f
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/pypi.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Upload package to PyPi
name: Python package build and publish

on:
push:
Expand All @@ -17,10 +17,17 @@ jobs:
python-version: ${{ inputs.python-version }}
poetry-version: ${{ inputs.poetry-version }}

- name: Build and publish
- name: Build package
run: |
poetry build
- name: Install package (optional)
run: |
pip install --upgrade dist/*
- name: Upload to PyPI
if: github.event_name == 'release'
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
poetry run python setup.py sdist bdist_wheel
pip install --upgrade dist/*
# twine upload dist/* --verbose --non-interactive --repository pypi -u __token__ -p $PYPI_API_TOKEN
poetry publish --build -r pypi -u __token__ -p $PYPI_API_TOKEN --non-interactive

0 comments on commit e21d65f

Please sign in to comment.