mirror of
https://github.com/ultrajson/ultrajson.git
synced 2024-06-02 14:46:04 +02:00
Deploy to PyPI using trusted publishing
This commit is contained in:
parent
a179fb55db
commit
2080d73c67
|
@ -118,6 +118,9 @@ jobs:
|
||||||
build-sdist-and-upload:
|
build-sdist-and-upload:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: ['build-native-wheels', 'build-QEMU-emulated-wheels']
|
needs: ['build-native-wheels', 'build-QEMU-emulated-wheels']
|
||||||
|
permissions:
|
||||||
|
# IMPORTANT: this permission is mandatory for trusted publishing
|
||||||
|
id-token: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
@ -154,16 +157,11 @@ jobs:
|
||||||
if: github.event.action == 'published'
|
if: github.event.action == 'published'
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
with:
|
with:
|
||||||
user: __token__
|
|
||||||
password: ${{ secrets.pypi_password }}
|
|
||||||
packages-dir: dist-wheels/
|
packages-dir: dist-wheels/
|
||||||
|
|
||||||
- name: Publish sdist to PyPI
|
- name: Publish sdist to PyPI
|
||||||
if: github.event.action == 'published'
|
if: github.event.action == 'published'
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
with:
|
|
||||||
user: __token__
|
|
||||||
password: ${{ secrets.pypi_password }}
|
|
||||||
|
|
||||||
- name: Publish wheels to TestPyPI
|
- name: Publish wheels to TestPyPI
|
||||||
if: |
|
if: |
|
||||||
|
@ -171,8 +169,6 @@ jobs:
|
||||||
github.ref == 'refs/heads/main'
|
github.ref == 'refs/heads/main'
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
with:
|
with:
|
||||||
user: __token__
|
|
||||||
password: ${{ secrets.test_pypi_password }}
|
|
||||||
repository-url: https://test.pypi.org/legacy/
|
repository-url: https://test.pypi.org/legacy/
|
||||||
packages-dir: dist-wheels/
|
packages-dir: dist-wheels/
|
||||||
|
|
||||||
|
@ -182,6 +178,4 @@ jobs:
|
||||||
github.ref == 'refs/heads/main'
|
github.ref == 'refs/heads/main'
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
with:
|
with:
|
||||||
user: __token__
|
|
||||||
password: ${{ secrets.test_pypi_password }}
|
|
||||||
repository-url: https://test.pypi.org/legacy/
|
repository-url: https://test.pypi.org/legacy/
|
||||||
|
|
Loading…
Reference in New Issue