From d83c4519def0efb1e06626157a1303a5280f8539 Mon Sep 17 00:00:00 2001 From: Ratha SIV <60795657+rathaumons@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:40:45 +0200 Subject: [PATCH] Update and improve publish workflow --- .github/workflows/publish.yaml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 517e954..8f9d587 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -11,30 +11,30 @@ jobs: name: Build wheel runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: '3.11' - name: Install requirements run: | python -m pip install --upgrade pip pip install "setuptools>=67.2.0" - pip install -r requirements.txt pip install wheel build PyYAML - - name: Build .whl + - name: Build run: | python -m build --wheel --skip-dependency-check - - name: Archive wheels - uses: actions/upload-artifact@v3 + - name: Archive + uses: actions/upload-artifact@v4 with: + name: pypi-dist-wheel path: dist/*.whl build_source: name: Build source runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: '3.11' - name: Install requirements @@ -42,12 +42,13 @@ jobs: python -m pip install --upgrade pip pip install "setuptools>=67.2.0" pip install wheel build PyYAML - - name: Build .tar.gz + - name: Build run: | python -m build --sdist --skip-dependency-check - - name: Archive wheels - uses: actions/upload-artifact@v3 + - name: Archive + uses: actions/upload-artifact@v4 with: + name: pypi-dist-source path: dist/*.tar.gz publish_pypi: @@ -58,10 +59,11 @@ jobs: permissions: id-token: write steps: - - name: Collect and extract artifact - uses: actions/download-artifact@v3 + - name: Collect artifacts + uses: actions/download-artifact@v4 with: - name: artifact path: dist + pattern: pypi-dist-* + merge-multiple: true - name: Publish uses: pypa/gh-action-pypi-publish@release/v1