diff --git a/.github/workflows/publish-test.yml b/.github/workflows/publish-test.yml index f201b7c41..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,14 +32,11 @@ 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 - with: - user: ${{ secrets.PYPI_USERNAME }} - password: ${{ secrets.PYPI_PASSWORD }} + + - name: 🚀 Publish to PyPi + uses: pypa/gh-action-pypi-publish@release/v1.10 + - 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 }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4de06532e..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,14 +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 - with: - user: ${{ secrets.PYPI_USERNAME }} - password: ${{ secrets.PYPI_PASSWORD }} + uses: pypa/gh-action-pypi-publish@release/v1.10 + - 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 }}