Skip to content

Commit

Permalink
Merge pull request #7616 from radarhere/pypi
Browse files Browse the repository at this point in the history
Added trusted PyPI publishing
  • Loading branch information
radarhere committed Dec 26, 2023
2 parents d4fd049 + 043e13d commit 265ee32
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions .github/workflows/wheels.yml
Expand Up @@ -75,9 +75,9 @@ jobs:
CIBW_TEST_SKIP: "*-macosx_arm64"
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macosx_deployment_target }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: dist
name: dist-${{ matrix.os }}-${{ matrix.archs }}${{ matrix.manylinux && format('-{0}', matrix.manylinux) }}
path: ./wheelhouse/*.whl

windows:
Expand Down Expand Up @@ -154,9 +154,9 @@ jobs:
shell: cmd

- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
name: dist-windows-${{ matrix.arch }}
path: ./wheelhouse/*.whl

- name: Upload fribidi.dll
Expand All @@ -179,17 +179,26 @@ jobs:

- run: make sdist

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: dist
name: dist-sdist
path: dist/*.tar.gz

success:
permissions:
contents: none
pypi-publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs: [build, windows, sdist]
runs-on: ubuntu-latest
name: Wheels Successful
name: Upload release to PyPI
environment:
name: release-pypi
url: https://pypi.org/p/Pillow
permissions:
id-token: write
steps:
- name: Success
run: echo Wheels Successful
- uses: actions/download-artifact@v4
with:
pattern: dist-*
path: dist
merge-multiple: true
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 265ee32

Please sign in to comment.