Skip to content

Commit 661f529

Browse files
committed
Update actions to build and publish the package
1 parent 9c3853a commit 661f529

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
pipenv run isort .
3434
- name: Lint with Pylint
3535
run: |
36-
pipenv run pylint msgraph --disable=W --rcfile=.pylintrc
36+
pipenv run pylint src --disable=W --rcfile=.pylintrc
3737
- name: Test with pytest
3838
run: |
3939
pipenv run pytest

.github/workflows/publish.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@v2
15-
- name: Set up Python 3.8
16-
uses: actions/setup-python@v1
14+
uses: actions/checkout@v3
15+
- name: Set up Python 3.9
16+
uses: actions/setup-python@v3
1717
with:
18-
python-version: 3.8
19-
- name: Install flit
18+
python-version: 3.9
19+
- name: Install dependencies
2020
run: |
21-
pip install flit
22-
- name: Publish the distibution to PyPI
23-
if: github.repository == 'microsoftgraph/msgraph-sdk-python-core'
24-
run: flit publish
25-
env:
26-
FLIT_INDEX_URL: https://upload.pypi.org/legacy/
27-
FLIT_USERNAME: __token__
28-
FLIT_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
21+
python -m pip install --upgrade pip
22+
pip install build
23+
- name: Build package
24+
run: python -m build
25+
- name: Publish package
26+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
27+
with:
28+
user: __token__
29+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)