Skip to content

Commit c1f5998

Browse files
authored
Merge pull request #424 from microsoftgraph/shem/update_release_configurtaion_use_flint
update release configuration - use flint
2 parents 2508255 + 15edd43 commit c1f5998

File tree

3 files changed

+49
-28
lines changed

3 files changed

+49
-28
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,27 @@
1-
name: Build and valiate SDK package
1+
name: Validate code accuracy
22

33
on:
44
workflow_dispatch:
5-
workflow_call:
65
push:
76
branches: [ main ]
87
pull_request:
98
branches: [ main, dev ]
10-
11-
permissions:
12-
contents: read
9+
workflow_call:
1310

1411
jobs:
1512
validate:
1613
name: Validate code accuracy
1714
runs-on: ubuntu-latest
18-
steps:
19-
- uses: actions/checkout@v4
20-
- name: Set up Python
21-
uses: actions/setup-python@v5
22-
with:
23-
python-version: '3.8'
24-
- name: Install dependencies
25-
run: |
26-
python -m pip install --upgrade pip
27-
pip install -r requirements-dev.txt
28-
- name: Lint with Pylint
29-
run: pylint msgraph_beta --disable=W --rcfile=.pylintrc
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.12'
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -r requirements-dev.txt
25+
26+
- name: Lint with Pylint
27+
run: pylint msgraph_beta --disable=W --rcfile=.pylintrc

.github/workflows/publish.yml

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,33 @@ permissions:
99
contents: write
1010

1111
jobs:
12+
version:
13+
name: Update version
14+
runs-on: ubuntu-latest
15+
if: startsWith(github.ref, 'refs/tags/v')
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
- name: Set up Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: 3.12
23+
- name: Install poetry
24+
run: |
25+
pip install --upgrade poetry
26+
- name: Update version
27+
run: |
28+
VERSION=${GITHUB_REF#refs/tags/v}
29+
poetry version $VERSION
30+
- name: Commit changes
31+
run: |
32+
git config --local user.email "${{ secrets.GIT_USER_EMAIL }}"
33+
git config --local user.name "${{ secrets.GIT_USER_NAME }}"
34+
git commit -am "chore: Update version"
35+
git push origin ${{ github.ref }}
36+
1237
build:
38+
needs: [version]
1339
uses: ./.github/workflows/build.yml
1440

1541
publish:
@@ -25,17 +51,15 @@ jobs:
2551
uses: actions/setup-python@v5
2652
with:
2753
python-version: 3.12
28-
- name: Install dependencies
54+
- name: Install flit
2955
run: |
30-
python -m pip install --upgrade pip
31-
pip install build
32-
- name: Build package
33-
run: python -m build
34-
- name: Publish package
35-
uses: pypa/gh-action-pypi-publish@release/v1
36-
with:
37-
user: __token__
38-
password: ${{ secrets.PYPI_API_TOKEN }}
56+
pip install flit
57+
- name: Publish the distibution to PyPI
58+
run: flit publish
59+
env:
60+
FLIT_INDEX_URL: https://upload.pypi.org/legacy/
61+
FLIT_USERNAME: __token__
62+
FLIT_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
3963

4064
release:
4165
name: Create release

msgraph_beta/graph_service_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,3 @@ def me(self) -> UserItemRequestBuilder:
5151
url_tpl_parameters["user%2Did"] = "me-token-to-replace"
5252

5353
return UserItemRequestBuilder(self.request_adapter, url_tpl_parameters)
54-

0 commit comments

Comments
 (0)