Skip to content

Commit

Permalink
configure for oidc auth with pypi (#833)
Browse files Browse the repository at this point in the history
* configure for oidc auth with pypi

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update .github/workflows/python-tests.yml

* Update python-tests.yml

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
RonnyPfannschmidt and pre-commit-ci[bot] committed May 26, 2023
1 parent 8856af6 commit fb92e81
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ jobs:

runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
permissions:
id-token: write
needs: [test]
steps:
- uses: actions/download-artifact@v3
Expand All @@ -105,5 +107,19 @@ jobs:
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

test-pypi-upload:
runs-on: ubuntu-latest
needs: [test]
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: Packages
path: dist
- name: Publish package to PyPI
continue-on-error: true
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi_token }}
repository-url: https://test.pypi.org/legacy/

0 comments on commit fb92e81

Please sign in to comment.