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 }}