From dc488d2ed5a4c41b2db1b82bf11cf55cc6e5ad22 Mon Sep 17 00:00:00 2001 From: rafa-be Date: Tue, 1 Oct 2024 16:39:37 +0200 Subject: [PATCH] PyPI upload workflow uses thrusted publisher instead of PyPI API token. Signed-off-by: rafa-be --- .github/workflows/pypi.yml | 11 ++++------- scaler/about.py | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index e7aab62..dcee89f 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -9,9 +9,10 @@ permissions: jobs: deploy: - runs-on: ubuntu-latest - + environment: release + permissions: + id-token: write steps: - uses: actions/checkout@v4 - name: Checkout code @@ -30,8 +31,4 @@ jobs: run: python -m build - name: Publish to PyPI - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} - run: | - python -m twine upload dist/* + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/scaler/about.py b/scaler/about.py index 2294476..89c6ad8 100644 --- a/scaler/about.py +++ b/scaler/about.py @@ -1 +1 @@ -__version__ = "1.8.4" +__version__ = "1.8.5"