From 15473d62bd28f34654c71b0d5a7a74a6613152cc Mon Sep 17 00:00:00 2001 From: scrazzz Date: Fri, 19 Jan 2024 01:03:42 +0530 Subject: [PATCH] Update pypi workflow using OIDC --- .github/workflows/pypi.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index c33f723..df828e2 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -8,6 +8,9 @@ on: jobs: pypi: runs-on: ubuntu-latest + environment: pypi + permissions: + id-token: write steps: - name: Checkout uses: actions/checkout@v3 @@ -17,14 +20,11 @@ jobs: with: python-version: '3.10' - - name: Install deps - run: python -m pip install -U build twine + - name: Install `build` dependency + run: python -m pip install -U build - - name: Build `dist/` + - name: Build dist/ run: python -m build - - name: Upload to PyPi - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: python -m twine upload dist/* + - name: Publish package to PyPi + uses: pypa/gh-action-pypi-publish@release/v1