Skip to content

Commit

Permalink
♻️ move publishing out of reusable workflow
Browse files Browse the repository at this point in the history
Trusted publishing does not yet work with reusable workflows from different repositories (see pypi/warehouse#11096)

Signed-off-by: burgholzer <burgholzer@me.com>
  • Loading branch information
burgholzer committed Aug 28, 2023
1 parent 0e8afc4 commit 48d8e80
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 23 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,20 @@ jobs:
python-packaging:
name: 🐍 Packaging
uses: ./.github/workflows/reusable-python-packaging.yml
with:
package-name: mqt.core

deploy:
if: github.event_name == 'release' && github.event.action == 'published'
name: 🚀 Deploy to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/mqt.core
permissions:
id-token: write
needs: [python-packaging]
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
21 changes: 0 additions & 21 deletions .github/workflows/reusable-python-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ name: 🐍 • Packaging
on:
workflow_call:
inputs:
package-name:
description: "The name of the Python package"
required: true
type: string
setup-z3:
description: "Whether to set up Z3"
default: false
Expand Down Expand Up @@ -104,20 +100,3 @@ jobs:
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

deploy:
if: github.event_name == 'release' && github.event.action == 'published'
name: 🚀 Deploy to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/${{ inputs.package-name }}
permissions:
id-token: write
needs: [build_wheels, build_sdist, build_wheels_emulation]
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 48d8e80

Please sign in to comment.