-
Notifications
You must be signed in to change notification settings - Fork 13
70 lines (65 loc) · 2.3 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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/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"