Publish to PyPI with a Trusted Publisher
This commit is contained in:
parent
f0ea480334
commit
56fc297371
9
.github/workflows/deploy.yml
vendored
9
.github/workflows/deploy.yml
vendored
|
@ -14,6 +14,10 @@ jobs:
|
||||||
if: github.repository_owner == 'pylast'
|
if: github.repository_owner == 'pylast'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
# IMPORTANT: this permission is mandatory for trusted publishing
|
||||||
|
id-token: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
|
@ -39,13 +43,8 @@ jobs:
|
||||||
- name: Publish package to PyPI
|
- name: Publish package 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 package to TestPyPI
|
- name: Publish package to TestPyPI
|
||||||
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 a new issue