Skip to content

Commit 48d8e80

Browse files
committed
♻️ move publishing out of reusable workflow
Trusted publishing does not yet work with reusable workflows from different repositories (see pypi/warehouse#11096) Signed-off-by: burgholzer <[email protected]>
1 parent 0e8afc4 commit 48d8e80

File tree

2 files changed

+17
-23
lines changed

2 files changed

+17
-23
lines changed

.github/workflows/cd.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,20 @@ jobs:
88
python-packaging:
99
name: 🐍 Packaging
1010
uses: ./.github/workflows/reusable-python-packaging.yml
11-
with:
12-
package-name: mqt.core
11+
12+
deploy:
13+
if: github.event_name == 'release' && github.event.action == 'published'
14+
name: 🚀 Deploy to PyPI
15+
runs-on: ubuntu-latest
16+
environment:
17+
name: pypi
18+
url: https://pypi.org/p/mqt.core
19+
permissions:
20+
id-token: write
21+
needs: [python-packaging]
22+
steps:
23+
- uses: actions/download-artifact@v3
24+
with:
25+
name: artifact
26+
path: dist
27+
- uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/reusable-python-packaging.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ name: 🐍 • Packaging
33
on:
44
workflow_call:
55
inputs:
6-
package-name:
7-
description: "The name of the Python package"
8-
required: true
9-
type: string
106
setup-z3:
117
description: "Whether to set up Z3"
128
default: false
@@ -104,20 +100,3 @@ jobs:
104100
- uses: actions/upload-artifact@v3
105101
with:
106102
path: ./wheelhouse/*.whl
107-
108-
deploy:
109-
if: github.event_name == 'release' && github.event.action == 'published'
110-
name: 🚀 Deploy to PyPI
111-
runs-on: ubuntu-latest
112-
environment:
113-
name: pypi
114-
url: https://pypi.org/p/${{ inputs.package-name }}
115-
permissions:
116-
id-token: write
117-
needs: [build_wheels, build_sdist, build_wheels_emulation]
118-
steps:
119-
- uses: actions/download-artifact@v3
120-
with:
121-
name: artifact
122-
path: dist
123-
- uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)