diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index da23c41..6e4065c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -76,11 +76,10 @@ jobs: publish: needs: [build_wheels, build_sdist] - environment: pypi + environment: ${{ github.event.inputs.repository }} permissions: id-token: write runs-on: ubuntu-latest - if: github.event_name == 'release' && github.event.action == 'published' steps: - uses: actions/download-artifact@v4 with: @@ -89,32 +88,5 @@ jobs: merge-multiple: true - uses: pypa/gh-action-pypi-publish@release/v1 - - # publish: - # name: 'Upload to PyPI/TestPyPI' - # runs-on: ubuntu-20.04 - # needs: [build_wheels, build_sdist] - # steps: - # - name: Set up Python - # uses: actions/setup-python@v5 - # with: - # python-version: '3.9' - - # - name: Set up built items - # uses: actions/download-artifact@v4 - # with: - # pattern: cibw-* - # path: dist - # merge-multiple: true - - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # pip install setuptools wheel twine - - # - name: Publish - # env: - # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - # run: | - # twine upload --verbose --repository ${{ github.event.inputs.repository }} dist/* + with: + password: ${{ secrets.PYPI_API_TOKEN }}