diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c40d7e928..c3f129b6f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,24 +10,30 @@ permissions: contents: read jobs: - deploy: + publish: runs-on: ubuntu-latest - environment: release - permissions: - id-token: write + steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - cache: pip - cache-dependency-path: pyproject.toml - - name: Install dependencies - run: | - pip install setuptools wheel build - - name: Build - run: | - python -m build - - name: Publish - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Check out the repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.x # Adjust the Python version as needed + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + + - name: Build the package + run: | + python setup.py sdist bdist_wheel + + - name: Publish to PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: | + twine upload dist/*