transpiler-v0.1.0 #7
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to PyPI | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| inputs: | |
| package: | |
| description: 'Package to publish' | |
| required: true | |
| default: 'all' | |
| type: choice | |
| options: | |
| - all | |
| - meta-package | |
| - code-assistant | |
| - runtime | |
| - transpiler | |
| jobs: | |
| publish-code-assistant: | |
| if: | | |
| (github.event_name == 'release' && contains(github.ref, 'code-assistant')) || | |
| (github.event_name == 'workflow_dispatch' && (github.event.inputs.package == 'all' || github.event.inputs.package == 'code-assistant')) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # Required for trusted publishing | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Build package | |
| working-directory: ./qiskit-code-assistant-mcp-server | |
| run: | | |
| uv build --out-dir dist | |
| - name: Verify build output | |
| run: | | |
| ls -la qiskit-code-assistant-mcp-server/dist/ | |
| if [ ! -d "qiskit-code-assistant-mcp-server/dist" ] || [ -z "$(ls -A qiskit-code-assistant-mcp-server/dist)" ]; then | |
| echo "ERROR: Build did not produce any distribution files" | |
| exit 1 | |
| fi | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: qiskit-code-assistant-mcp-server/dist/ | |
| verbose: true | |
| publish-runtime: | |
| if: | | |
| (github.event_name == 'release' && contains(github.ref, 'runtime')) || | |
| (github.event_name == 'workflow_dispatch' && (github.event.inputs.package == 'all' || github.event.inputs.package == 'runtime')) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # Required for trusted publishing | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Build package | |
| working-directory: ./qiskit-ibm-runtime-mcp-server | |
| run: | | |
| uv build --out-dir dist | |
| - name: Verify build output | |
| run: | | |
| ls -la qiskit-ibm-runtime-mcp-server/dist/ | |
| if [ ! -d "qiskit-ibm-runtime-mcp-server/dist" ] || [ -z "$(ls -A qiskit-ibm-runtime-mcp-server/dist)" ]; then | |
| echo "ERROR: Build did not produce any distribution files" | |
| exit 1 | |
| fi | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: qiskit-ibm-runtime-mcp-server/dist/ | |
| verbose: true | |
| publish-transpiler: | |
| if: | | |
| (github.event_name == 'release' && contains(github.ref, 'transpiler')) || | |
| (github.event_name == 'workflow_dispatch' && (github.event.inputs.package == 'all' || github.event.inputs.package == 'transpiler')) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # Required for trusted publishing | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Build package | |
| working-directory: ./qiskit-ibm-transpiler-mcp-server | |
| run: | | |
| uv build --out-dir dist | |
| - name: Verify build output | |
| run: | | |
| ls -la qiskit-ibm-transpiler-mcp-server/dist/ | |
| if [ ! -d "qiskit-ibm-transpiler-mcp-server/dist" ] || [ -z "$(ls -A qiskit-ibm-transpiler-mcp-server/dist)" ]; then | |
| echo "ERROR: Build did not produce any distribution files" | |
| exit 1 | |
| fi | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: qiskit-ibm-transpiler-mcp-server/dist/ | |
| verbose: true | |
| publish-meta-package: | |
| runs-on: ubuntu-latest | |
| # Meta-package should be published after individual servers | |
| needs: [publish-code-assistant, publish-runtime, publish-transpiler] | |
| # Allow meta-package to run even if individual packages were skipped (already published) | |
| if: | | |
| always() && | |
| (needs.publish-code-assistant.result == 'success' || needs.publish-code-assistant.result == 'skipped') && | |
| (needs.publish-runtime.result == 'success' || needs.publish-runtime.result == 'skipped') && | |
| (needs.publish-transpiler.result == 'success' || needs.publish-transpiler.result == 'skipped') && | |
| ((github.event_name == 'release' && contains(github.ref, 'meta')) || | |
| (github.event_name == 'workflow_dispatch' && (github.event.inputs.package == 'all' || github.event.inputs.package == 'meta-package'))) | |
| permissions: | |
| id-token: write # Required for trusted publishing | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Build meta-package | |
| run: | | |
| uv build | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: dist/ | |
| verbose: true |