1
0
Fork 0
mirror of https://github.com/ultrajson/ultrajson.git synced 2024-05-07 18:06:14 +02:00

CI deploy: Upload all wheels from a single, final job (#596)

This commit is contained in:
Hugo van Kemenade 2023-06-07 23:24:28 +03:00 committed by GitHub
commit db1138ad8d
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,25 +58,6 @@ jobs:
name: wheels
path: dist/*.whl
- name: Publish package to PyPI
if: github.event.action == 'published'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
skip-existing: true
- name: Publish package to TestPyPI
if: |
github.repository == 'ultrajson/ultrajson' &&
github.ref == 'refs/heads/main'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository-url: https://test.pypi.org/legacy/
skip-existing: true
build-QEMU-emulated-wheels:
runs-on: ubuntu-latest
strategy:
@ -134,26 +115,7 @@ jobs:
name: wheels
path: dist/*.whl
- name: Publish package to PyPI
if: github.event.action == 'published'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
skip-existing: true
- name: Publish package to TestPyPI
if: |
github.repository == 'ultrajson/ultrajson' &&
github.ref == 'refs/heads/main'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository-url: https://test.pypi.org/legacy/
skip-existing: true
build-sdist:
build-sdist-and-upload:
runs-on: ubuntu-latest
needs: ['build-native-wheels', 'build-QEMU-emulated-wheels']
@ -174,21 +136,47 @@ jobs:
python -m pip install -U pip
python -m pip install -U build twine
- name: Download wheels from build artifacts
uses: actions/download-artifact@v3
with:
name: wheels
path: dist-wheels/
- name: Build package
run: |
git tag
python setup.py --version
python -m build --sdist
twine check --strict dist/*
twine check --strict dist-wheels/*
- name: Publish package to PyPI
- name: Publish wheels to PyPI
if: github.event.action == 'published'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
packages-dir: dist-wheels/
- name: Publish sdist to PyPI
if: github.event.action == 'published'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
- name: Publish package to TestPyPI
- name: Publish wheels to TestPyPI
if: |
github.repository == 'ultrajson/ultrajson' &&
github.ref == 'refs/heads/main'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.test_pypi_password }}
repository-url: https://test.pypi.org/legacy/
packages-dir: dist-wheels/
- name: Publish sdist to TestPyPI
if: |
github.repository == 'ultrajson/ultrajson' &&
github.ref == 'refs/heads/main'