Skip to content

Commit d965e03

Browse files
committed
Update publishing config
1 parent 27108e4 commit d965e03

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

.github/workflows/packaging.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
with:
116116
path: dist/*.tar.gz
117117

118-
publish:
118+
publish_test:
119119
needs: [format, lint, typecheck, test, docs]
120120
if: startsWith(github.ref, 'refs/tags')
121121
runs-on: ubuntu-latest
@@ -142,6 +142,28 @@ jobs:
142142
with:
143143
repository-url: https://test.pypi.org/legacy/
144144

145+
publish_prod:
146+
needs: [format, lint, typecheck, test, docs]
147+
if: startsWith(github.ref, 'refs/tags')
148+
runs-on: ubuntu-latest
149+
environment: release
150+
permissions:
151+
id-token: write
152+
contents: write
153+
steps:
154+
- uses: actions/checkout@v5
155+
156+
- name: Set up Python
157+
uses: actions/setup-python@v5
158+
with:
159+
python-version: "3.10"
160+
161+
- name: Install pypa/build
162+
run: python -m pip install build
163+
164+
- name: Build distribution
165+
run: python -m build --outdir dist/
166+
145167
- name: Publish distribution to PyPI
146168
uses: pypa/gh-action-pypi-publish@release/v1
147169

0 commit comments

Comments
 (0)