From 7daea02ce522e5f2fc9129fa2022cc0e85a5c805 Mon Sep 17 00:00:00 2001 From: Jasper Craeghs Date: Wed, 3 Jul 2024 22:20:41 +0200 Subject: [PATCH 1/3] Upgrade GitHub actions for up- and downloading artifacts --- .github/workflows/python-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 0fc03c0d..446ff386 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -45,7 +45,7 @@ jobs: run: tox -e check - name: Upload HTML documentation if: matrix.python-version == 3.9 - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: html-doc path: doc/_build/html @@ -58,7 +58,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Download HTML documentation from job 'test' - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: html-doc path: doc/_build/html From 865e49bc28d52f85a3613eabde064812f1a2e9cf Mon Sep 17 00:00:00 2001 From: Jasper Craeghs Date: Wed, 3 Jul 2024 22:28:06 +0200 Subject: [PATCH 2/3] Use Python 3.12 and the build module to make use of pyproject.toml --- .github/workflows/python-package.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 446ff386..ff1e31e7 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -72,15 +72,14 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.7' + python-version: '3.12' - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine + python3 -m pip install --upgrade build twine - name: Build and publish env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | - python setup.py sdist bdist_wheel + python3 -m build twine upload dist/* From 7f2abb307fc2dd39491b53fb434b8afe16b7298c Mon Sep 17 00:00:00 2001 From: Jasper Craeghs Date: Wed, 3 Jul 2024 22:40:55 +0200 Subject: [PATCH 3/3] Stick with 'python' instead of 'python3' --- .github/workflows/python-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index ff1e31e7..8b75c3ce 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -75,11 +75,11 @@ jobs: python-version: '3.12' - name: Install dependencies run: | - python3 -m pip install --upgrade build twine + python -m pip install --upgrade build twine - name: Build and publish env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | - python3 -m build + python -m build twine upload dist/*