From 47b493f5202f9e8e41cf069774761af1e0741692 Mon Sep 17 00:00:00 2001 From: Sepehr Karimiziarani <112987653+sepehrkrz@users.noreply.github.com> Date: Sun, 29 Oct 2023 17:34:57 -0500 Subject: [PATCH] Update python-publish.yml action v1 revert --- .github/workflows/python-publish.yml | 36 +++++++++++++--------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 437f92b..2e43d68 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -5,27 +5,25 @@ on: types: - closed -permissions: - contents: read - jobs: deploy: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build - - name: Build package - run: python -m build - - name: Publish package - uses: pypa/gh-action-pypi-publish@master - with: - password: ${{ secrets.PYPI_API_TOKEN }} + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.x + + - name: Install dependencies + run: pip install setuptools wheels + + - name: Build and deploy package + run: | + python setup.py sdist bdist_wheel + pip install twine + twine upload -u '__token__' -p '${{ secrets.PYPI_API_TOKEN }}' dist/* +