Skip to content

Commit 39d8856

Browse files
authored
Enable deploy workflow (#282)
1 parent 0d8b3d4 commit 39d8856

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

.github/workflows/pypi_deploy.yml

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -86,33 +86,32 @@ jobs:
8686
python -m pip install --find-links ./dist serialbox4py
8787
python -c "from serialbox import *"
8888
89-
# publish-pypi:
90-
# name: Publish Python distribution to pypi.org
91-
# runs-on: ubuntu-latest
92-
# needs: [build_wheels, build_sdist]
93-
# if: ${{ github.event_name == 'workflow-dispatch' }}
94-
# environment:
95-
# name: pypi
96-
# url: https://pypi.org/project/serialbox4py/
97-
# permissions:
98-
# id-token: write
99-
# steps:
100-
# - name: Download wheel
101-
# uses: actions/download-artifact@v4
102-
# with:
103-
# path: dist
104-
# merge-multiple: true
105-
# - name: Publish distribution to PyPI
106-
# uses: pypa/gh-action-pypi-publish@release/v1
107-
# with:
108-
# repository-url: https://pypi.org/legacy/
89+
publish-pypi:
90+
name: Publish Python distribution to pypi.org
91+
runs-on: ubuntu-latest
92+
needs: [build_wheels, build_sdist]
93+
if: ${{ github.event_name == 'workflow_dispatch' }}
94+
environment:
95+
name: pypi
96+
url: https://pypi.org/project/serialbox4py/
97+
permissions:
98+
id-token: write
99+
steps:
100+
- name: Download wheel
101+
uses: actions/download-artifact@v4
102+
with:
103+
path: dist
104+
merge-multiple: true
105+
- name: Publish distribution to PyPI
106+
uses: pypa/gh-action-pypi-publish@release/v1
107+
with:
108+
repository-url: https://pypi.org/legacy/
109109

110110
publish-test-pypi:
111111
name: Publish Python distribution to test.pypi.org
112112
runs-on: ubuntu-latest
113113
needs: [build_wheels, build_sdist]
114-
if: ${{ github.event_name == 'workflow_dispatch' }} # TODO: once working, enable line below
115-
# if: ${{ github.event_name == 'release' }} # triggered by releasing on github, test first before manually triggering the deployment to PyPI (see release documentation)
114+
if: ${{ github.event_name == 'release' }} # triggered by releasing on github, test first before manually triggering the deployment to PyPI (see release documentation)
116115
environment:
117116
name: testpypi
118117
url: https://test.pypi.org/project/serialbox4py/

0 commit comments

Comments
 (0)