Publish mgp-gateway #1
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 mgp-gateway | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| release-build: | |
| name: Build mgp-gateway | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: reference | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.x" | |
| - name: Build release distributions | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install build | |
| python -m build | |
| - name: Upload distributions | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: mgp-gateway-dists | |
| path: reference/dist/ | |
| pypi-publish: | |
| name: Publish mgp-gateway to PyPI | |
| runs-on: ubuntu-latest | |
| needs: | |
| - release-build | |
| permissions: | |
| id-token: write | |
| environment: | |
| name: pypi | |
| steps: | |
| - name: Retrieve release distributions | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: mgp-gateway-dists | |
| path: dist/ | |
| - name: Publish release distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: dist/ |