Merge pull request #419 from microsoft/release-please--branches--main #46
Workflow file for this run
This file contains 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 package to PyPI | |
on: | |
push: | |
tags: | |
- "microsoft-kiota-abstractions-v*" # Push events to matching microsoft-kiota-abstractions-v*, i.e. microsoft-kiota-abstractions-v1.0, microsoft-kiota-abstractions-v20.15.10 | |
# All packages are ideally released together so we can use the same tag for all packages | |
permissions: | |
contents: write | |
jobs: | |
build: | |
uses: ./.github/workflows/build.yml | |
publish: | |
name: Publish distribution to PyPI | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/microsoft-kiota-abstractions-v') | |
environment: pypi_prod | |
needs: [build] | |
env: | |
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install poetry and mono-repo-deps plugin | |
run: | | |
python -m pip install --upgrade poetry | |
python -m pip install --upgrade poetry-plugin-mono-repo-deps | |
- name: Publish kiota_abstractions to PyPI | |
run: | | |
poetry install | |
poetry publish --build | |
working-directory: "./packages/abstractions" | |
- name: Publish kiota_authentication_azure to PyPI | |
run: | | |
poetry install | |
poetry publish --build | |
working-directory: "./packages/authentication/azure" | |
- name: Publish kiota_http to PyPI | |
run: | | |
poetry install | |
poetry publish --build | |
working-directory: "./packages/http/httpx" | |
- name: Publish kiota_serialization_form to PyPI | |
run: | | |
poetry install | |
poetry publish --build | |
working-directory: "./packages/serialization/form" | |
- name: Publish kiota_serialization_json to PyPI | |
run: | | |
poetry install | |
poetry publish --build | |
working-directory: "./packages/serialization/json" | |
- name: Publish kiota_serialization_text to PyPI | |
run: | | |
poetry install | |
poetry publish --build | |
working-directory: "./packages/serialization/text" | |
- name: Publish kiota_serialization_multipart to PyPI | |
run: | | |
poetry install | |
poetry publish --build | |
working-directory: "./packages/serialization/multipart" | |
- name: Publish kiota_bundle to PyPI | |
run: | | |
poetry install | |
poetry publish --build | |
working-directory: "./packages/bundle" | |