diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index 85caf80..eec4276 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -7,42 +7,33 @@ jobs: name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: Set up Python 3.10 - uses: actions/setup-python@v3 - with: - python-version: "3.10" + steps: + - uses: actions/checkout@master + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" - - - script: | - python -m pip install --upgrade setuptools wheel - displayName: 'Install build tools' - - - script: | - python setup.py sdist bdist_wheel - displayName: 'Build and wheel' - - - name: Install build tools - run: >- - python -m - pip install - --upgrade - setuptools wheel - - name: Build and wheel - run: >- - python - setup.py - sdist - bdist_wheel + - name: Install build tools + run: >- + python -m + pip install + --upgrade + setuptools wheel + - name: Build and wheel + run: >- + python + setup.py + sdist + bdist_wheel - - name: Publish distribution 📦 to Test PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ -# - name: Publish distribution 📦 to PyPI -# if: startsWith(github.ref, 'refs/tags') -# uses: pypa/gh-action-pypi-publish@release/v1 -# with: -# password: ${{ secrets.PYPI_API_TOKEN }} + - name: Publish distribution 📦 to Test PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ + - name: Publish distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }}