From 787bbdac963f1861378364f04f1fed10eab8e15a Mon Sep 17 00:00:00 2001 From: Onuralp SEZER Date: Tue, 24 Sep 2024 13:03:46 +0300 Subject: [PATCH 1/2] =?UTF-8?q?ci:=20=F0=9F=91=B7=20pypi=20username=20-=20?= =?UTF-8?q?password=20swap=20with=20token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Onuralp SEZER --- .github/workflows/publish-test.yml | 12 +++++------- .github/workflows/publish.yml | 10 ++++------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish-test.yml b/.github/workflows/publish-test.yml index f201b7c41..973c30c9a 100644 --- a/.github/workflows/publish-test.yml +++ b/.github/workflows/publish-test.yml @@ -30,14 +30,12 @@ jobs: python -m pip install --upgrade build twine python -m build twine check --strict dist/* - - name: 🚀 Publish distribution to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + - name: 🚀 Publish to PyPi + uses: pypa/gh-action-pypi-publish@release/v1.10 with: - user: ${{ secrets.PYPI_USERNAME }} - password: ${{ secrets.PYPI_PASSWORD }} + password: ${{ secrets.PYPI_API_TOKEN }} - name: 🚀 Publish to Test-PyPi - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@release/v1.10 with: repository-url: https://test.pypi.org/legacy/ - user: ${{ secrets.PYPI_TEST_USERNAME }} - password: ${{ secrets.PYPI_TEST_PASSWORD }} + password: ${{ secrets.TEST_PYPI_API_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4de06532e..aee59eba8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,13 +28,11 @@ jobs: python -m build twine check --strict dist/* - name: 🚀 Publish to PyPi - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@release/v1.10 with: - user: ${{ secrets.PYPI_USERNAME }} - password: ${{ secrets.PYPI_PASSWORD }} + password: ${{ secrets.PYPI_API_TOKEN }} - name: 🚀 Publish to Test-PyPi - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@release/v1.10 with: repository-url: https://test.pypi.org/legacy/ - user: ${{ secrets.PYPI_TEST_USERNAME }} - password: ${{ secrets.PYPI_TEST_PASSWORD }} + password: ${{ secrets.TEST_PYPI_API_TOKEN }} From 31a3cca5d5990493124b99417ba6982937efa167 Mon Sep 17 00:00:00 2001 From: Onuralp SEZER Date: Thu, 26 Sep 2024 20:52:59 +0300 Subject: [PATCH 2/2] =?UTF-8?q?ci:=20=F0=9F=91=B7=20trusted=20publisher=20?= =?UTF-8?q?configuration=20added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Onuralp SEZER --- .github/workflows/publish-test.yml | 11 ++++++----- .github/workflows/publish.yml | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish-test.yml b/.github/workflows/publish-test.yml index 973c30c9a..567a6aba6 100644 --- a/.github/workflows/publish-test.yml +++ b/.github/workflows/publish-test.yml @@ -1,4 +1,4 @@ -name: Supervision Test Releases to PyPi +name: Publish Supervision Pre-Releases to PyPI and TestPyPI on: push: tags: @@ -9,9 +9,11 @@ on: workflow_dispatch: jobs: - build-n-publish: + build-and-publish-pre-release-pypi: name: Build and publish to PyPI runs-on: ubuntu-latest + permissions: + id-token: write strategy: matrix: python-version: ["3.10"] @@ -30,12 +32,11 @@ jobs: python -m pip install --upgrade build twine python -m build twine check --strict dist/* + - name: 🚀 Publish to PyPi uses: pypa/gh-action-pypi-publish@release/v1.10 - with: - password: ${{ secrets.PYPI_API_TOKEN }} + - name: 🚀 Publish to Test-PyPi uses: pypa/gh-action-pypi-publish@release/v1.10 with: repository-url: https://test.pypi.org/legacy/ - password: ${{ secrets.TEST_PYPI_API_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index aee59eba8..f9a14d225 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: Supervision Releases to PyPi +name: Publish Supervision Releases to PyPI and TestPyPI on: push: tags: @@ -7,8 +7,10 @@ on: workflow_dispatch: jobs: - build: + build-and-publish-pre-release: runs-on: ubuntu-latest + permissions: + id-token: write strategy: matrix: python-version: ["3.10"] @@ -27,12 +29,11 @@ jobs: python -m pip install --upgrade build twine python -m build twine check --strict dist/* + - name: 🚀 Publish to PyPi uses: pypa/gh-action-pypi-publish@release/v1.10 - with: - password: ${{ secrets.PYPI_API_TOKEN }} + - name: 🚀 Publish to Test-PyPi uses: pypa/gh-action-pypi-publish@release/v1.10 with: repository-url: https://test.pypi.org/legacy/ - password: ${{ secrets.TEST_PYPI_API_TOKEN }}