Skip to content

Commit

Permalink
chore: fix pypi package upload
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Jul 21, 2023
1 parent b1cc21a commit ba80864
Showing 1 changed file with 16 additions and 26 deletions.
42 changes: 16 additions & 26 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,21 @@
name: Publish PyPI Package

name: Publish PyPI package
on:
# Triggers the workflow on a new release
release:
types: [created]
push:
tags:
- v*.*.*

jobs:
deploy:
push_to_pypi:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
rm -rf dist build *.egg-info
python3 -m pip install --upgrade pip
python3 -m pip install setuptools wheel twine
- name: Build package
run: |
python3 setup.py sdist bdist_wheel
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

- name: Check out the repo
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v3
with:
python-version: 3.9
- uses: abatilo/[email protected]
- name: Run poetry build
run: poetry build
- name: Run poetry publish
run: POETRY_PYPI_TOKEN_PYPI=${{ secrets.PYPI_TOKEN }} poetry publish

0 comments on commit ba80864

Please sign in to comment.