Skip to content

Commit d7fae90

Browse files
committed
update release configuration - use flint
1 parent c6cdbaf commit d7fae90

File tree

2 files changed

+30
-28
lines changed

2 files changed

+30
-28
lines changed

.github/workflows/build.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
1-
name: Build and valiate SDK package
1+
name: Build and validate generated code
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:
15-
validate:
16-
name: Validate code accuracy
12+
build:
1713
runs-on: ubuntu-latest
14+
timeout-minutes: 40
15+
strategy:
16+
max-parallel: 5
17+
matrix:
18+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
1819
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
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install -r requirements-dev.txt
30+
31+
- name: Lint with Pylint
32+
run: pylint msgraph --disable=W --rcfile=.pylintrc

.github/workflows/publish.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,16 @@ jobs:
2525
uses: actions/setup-python@v5
2626
with:
2727
python-version: 3.12
28-
- name: Install dependencies
28+
- name: Install flit
2929
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 }}
30+
pip install flit
31+
- name: Publish the distibution to PyPI
32+
run: flit publish
33+
env:
34+
FLIT_INDEX_URL: https://upload.pypi.org/legacy/
35+
FLIT_USERNAME: __token__
36+
FLIT_PASSWORD: ${{ secrets. PYPI_API_TOKEN }}
37+
3938

4039
release:
4140
name: Create release

0 commit comments

Comments
 (0)