From 8c627bca89b1d75ae4cbb9d6faf199736e985c94 Mon Sep 17 00:00:00 2001 From: Johannes Mueller Date: Tue, 24 Sep 2024 13:30:03 +0200 Subject: [PATCH 1/5] Update github actions --- .github/workflows/docs-gh-pages.yml | 2 +- .github/workflows/pypi-deploy.yml | 27 +++++++++++++++++++-------- .github/workflows/pytest.yml | 4 ++-- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docs-gh-pages.yml b/.github/workflows/docs-gh-pages.yml index 294e0798..fa1940d3 100644 --- a/.github/workflows/docs-gh-pages.yml +++ b/.github/workflows/docs-gh-pages.yml @@ -25,7 +25,7 @@ jobs: runs-on: [ubuntu-latest] container: python:3.10-bookworm steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install dependencies run: | apt-get update diff --git a/.github/workflows/pypi-deploy.yml b/.github/workflows/pypi-deploy.yml index a968775c..d264726b 100644 --- a/.github/workflows/pypi-deploy.yml +++ b/.github/workflows/pypi-deploy.yml @@ -1,8 +1,9 @@ name: Build and upload to PyPI on: + workflow_dispatch: release: - type: [published] + types: [published] env: CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* @@ -18,11 +19,11 @@ jobs: matrix: os: [ubuntu-latest] #, windows-latest] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 name: Install Python with: python-version: '3.10' @@ -35,7 +36,7 @@ jobs: run: | # python -m cibuildwheel --output-dir wheelhouse python setup.py bdist_wheel - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: path: ./dist/*.whl @@ -44,11 +45,11 @@ jobs: name: Build source distribution runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 name: Install Python with: python-version: '3.10' @@ -60,7 +61,7 @@ jobs: - name: Build sdist run: python setup.py sdist - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: path: dist/*.tar.gz @@ -69,11 +70,21 @@ jobs: runs-on: ubuntu-latest if: github.event_name == 'release' && github.event.action == 'published' steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: artifact path: dist + - uses: actions/download-artifact@v4 + with: + name: artifact-wheel-windows-latest + path: dist + + - uses: actions/download-artifact@v4 + with: + name: artifact-wheel-ubuntu-latest + path: dist + - uses: pypa/gh-action-pypi-publish@master with: user: __token__ diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 4091082e..218b449f 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -19,9 +19,9 @@ jobs: python-version: ["3.8", "3.9", "3.10"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies From ce1e152feabc72af5f5bc28374917056ebdaafe6 Mon Sep 17 00:00:00 2001 From: Johannes Mueller Date: Tue, 24 Sep 2024 13:50:12 +0200 Subject: [PATCH 2/5] Add artifact names --- .github/workflows/pypi-deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pypi-deploy.yml b/.github/workflows/pypi-deploy.yml index d264726b..26a0d022 100644 --- a/.github/workflows/pypi-deploy.yml +++ b/.github/workflows/pypi-deploy.yml @@ -38,6 +38,7 @@ jobs: python setup.py bdist_wheel - uses: actions/upload-artifact@v4 with: + name: artifact-wheel-${{ matrix.os }} path: ./dist/*.whl @@ -63,6 +64,7 @@ jobs: - uses: actions/upload-artifact@v4 with: + name: artifact-sdist path: dist/*.tar.gz upload_pypi: From 05f9ab19eed3d24da7ad897ad9e8fb3fd0cdaca0 Mon Sep 17 00:00:00 2001 From: Johannes Mueller Date: Tue, 24 Sep 2024 13:54:56 +0200 Subject: [PATCH 3/5] Disable windows wheel upload --- .github/workflows/pypi-deploy.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pypi-deploy.yml b/.github/workflows/pypi-deploy.yml index 26a0d022..124d2623 100644 --- a/.github/workflows/pypi-deploy.yml +++ b/.github/workflows/pypi-deploy.yml @@ -77,10 +77,10 @@ jobs: name: artifact path: dist - - uses: actions/download-artifact@v4 - with: - name: artifact-wheel-windows-latest - path: dist + # - uses: actions/download-artifact@v4 + # with: + # name: artifact-wheel-windows-latest + # path: dist - uses: actions/download-artifact@v4 with: From 404e45bb9077ae428d70dee8bed24d3d964d5ac1 Mon Sep 17 00:00:00 2001 From: Johannes Mueller Date: Tue, 24 Sep 2024 13:56:53 +0200 Subject: [PATCH 4/5] Fix artifact name --- .github/workflows/pypi-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi-deploy.yml b/.github/workflows/pypi-deploy.yml index 124d2623..4d2f8089 100644 --- a/.github/workflows/pypi-deploy.yml +++ b/.github/workflows/pypi-deploy.yml @@ -74,7 +74,7 @@ jobs: steps: - uses: actions/download-artifact@v4 with: - name: artifact + name: artifact-sdist path: dist # - uses: actions/download-artifact@v4 From ea75604ac35e67f480760effc8343a1b0e7e56f4 Mon Sep 17 00:00:00 2001 From: Johannes Mueller Date: Tue, 24 Sep 2024 14:08:35 +0200 Subject: [PATCH 5/5] Update gh-pypi-action Signed-off-by: Johannes Mueller --- .github/workflows/pypi-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi-deploy.yml b/.github/workflows/pypi-deploy.yml index 4d2f8089..55dd2a5a 100644 --- a/.github/workflows/pypi-deploy.yml +++ b/.github/workflows/pypi-deploy.yml @@ -87,7 +87,7 @@ jobs: name: artifact-wheel-ubuntu-latest path: dist - - uses: pypa/gh-action-pypi-publish@master + - uses: pypa/gh-action-pypi-publish@v1.10.2 with: user: __token__ password: ${{ secrets.upload_pypi }}