From e0b98f0e8626ced1f17411e549f3465e9265989b Mon Sep 17 00:00:00 2001 From: MikeG Date: Wed, 7 Feb 2024 13:00:52 +0100 Subject: [PATCH] fix sdist so pypi upload can happen (#1105) --- .github/workflows/publish-sdist.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-sdist.yml b/.github/workflows/publish-sdist.yml index 55610439..87894d9c 100644 --- a/.github/workflows/publish-sdist.yml +++ b/.github/workflows/publish-sdist.yml @@ -1,4 +1,4 @@ -name: Publish sdist tarball to PyPi +name: PyPI on: push: @@ -10,17 +10,23 @@ jobs: name: Build and publish on PyPI runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.9 - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - name: Set up Python 3.11 + uses: actions/setup-python@v4 with: - python-version: 3.9 - - name: Build a source tarball + python-version: 3.11 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + python -m pip install build + + - name: Build distribution packages run: - python setup.py sdist + python -m build - - name: Publish distribution package to PyPI + - name: Publish distribution packages to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ - password: ${{ secrets.PYPI_PASSWORD }} + password: ${{ secrets.PYPI_API_TOKEN }}