Skip to content

Commit d1b4bd8

Browse files
authored
update publish workflow (#92)
1 parent 8ee63d3 commit d1b4bd8

1 file changed

Lines changed: 3 additions & 31 deletions

File tree

.github/workflows/publish.yml

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,10 @@ jobs:
7676

7777
publish:
7878
needs: [build_wheels, build_sdist]
79-
environment: pypi
79+
environment: ${{ github.event.inputs.repository }}
8080
permissions:
8181
id-token: write
8282
runs-on: ubuntu-latest
83-
if: github.event_name == 'release' && github.event.action == 'published'
8483
steps:
8584
- uses: actions/download-artifact@v4
8685
with:
@@ -89,32 +88,5 @@ jobs:
8988
merge-multiple: true
9089

9190
- uses: pypa/gh-action-pypi-publish@release/v1
92-
93-
# publish:
94-
# name: 'Upload to PyPI/TestPyPI'
95-
# runs-on: ubuntu-20.04
96-
# needs: [build_wheels, build_sdist]
97-
# steps:
98-
# - name: Set up Python
99-
# uses: actions/setup-python@v5
100-
# with:
101-
# python-version: '3.9'
102-
103-
# - name: Set up built items
104-
# uses: actions/download-artifact@v4
105-
# with:
106-
# pattern: cibw-*
107-
# path: dist
108-
# merge-multiple: true
109-
110-
# - name: Install dependencies
111-
# run: |
112-
# python -m pip install --upgrade pip
113-
# pip install setuptools wheel twine
114-
115-
# - name: Publish
116-
# env:
117-
# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
118-
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
119-
# run: |
120-
# twine upload --verbose --repository ${{ github.event.inputs.repository }} dist/*
91+
with:
92+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)