From 28579e01e879db92f7b569769038c180cde3c6bc Mon Sep 17 00:00:00 2001 From: Eugene Date: Thu, 6 Mar 2025 18:09:25 -0800 Subject: [PATCH 1/3] (2) --- .github/workflows/publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5e14f7a..7b46138 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -87,8 +87,8 @@ jobs: - name: Set up built items uses: actions/download-artifact@v4 with: - name: artifact - path: dist + name: wheelhouse-${{ strategy.job-index }} + path: wheelhouse - name: Install dependencies run: | From 250de86772ac5478faa37ab76fdaa5bab8b24d5b Mon Sep 17 00:00:00 2001 From: Eugene Date: Fri, 7 Mar 2025 10:17:24 -0800 Subject: [PATCH 2/3] (2) --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7b46138..3a4125b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -88,7 +88,7 @@ jobs: uses: actions/download-artifact@v4 with: name: wheelhouse-${{ strategy.job-index }} - path: wheelhouse + path: dist - name: Install dependencies run: | From ea5de05efe41fa7258bc29fb2dff6e209bd4188b Mon Sep 17 00:00:00 2001 From: Eugene Date: Thu, 27 Mar 2025 16:19:18 -0700 Subject: [PATCH 3/3] update publish step --- .github/workflows/publish.yml | 63 ++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 23 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3a4125b..da23c41 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -48,7 +48,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: wheelhouse-${{ strategy.job-index }} + name: cibw-wheels-${{ strategy.job-index }} path: ./wheelhouse/*.whl build_sdist: @@ -71,33 +71,50 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: dist-${{ strategy.job-index }} + name: cibw-sdist-${{ strategy.job-index }} path: dist/*.tar.gz publish: - name: 'Upload to PyPI/TestPyPI' - runs-on: ubuntu-20.04 needs: [build_wheels, build_sdist] + environment: pypi + permissions: + id-token: write + runs-on: ubuntu-latest + if: github.event_name == 'release' && github.event.action == 'published' steps: - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.9' + - uses: actions/download-artifact@v4 + with: + pattern: cibw-* + path: dist + merge-multiple: true - - name: Set up built items - uses: actions/download-artifact@v4 - with: - name: wheelhouse-${{ strategy.job-index }} - path: dist + - uses: pypa/gh-action-pypi-publish@release/v1 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine + # publish: + # name: 'Upload to PyPI/TestPyPI' + # runs-on: ubuntu-20.04 + # needs: [build_wheels, build_sdist] + # steps: + # - name: Set up Python + # uses: actions/setup-python@v5 + # with: + # python-version: '3.9' - - name: Publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - twine upload --verbose --repository ${{ github.event.inputs.repository }} dist/* + # - name: Set up built items + # uses: actions/download-artifact@v4 + # with: + # pattern: cibw-* + # path: dist + # merge-multiple: true + + # - name: Install dependencies + # run: | + # python -m pip install --upgrade pip + # pip install setuptools wheel twine + + # - name: Publish + # env: + # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + # run: | + # twine upload --verbose --repository ${{ github.event.inputs.repository }} dist/*