Skip to content

Commit 55fa1e9

Browse files
committed
update: workflows
1 parent f267836 commit 55fa1e9

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,16 @@ jobs:
1919
uses: actions/setup-python@v2
2020
with:
2121
python-version: ${{ matrix.python-version }}
22+
- name: Cache pip
23+
uses: actions/cache@v2
24+
with:
25+
path: ~/.cache/pip
26+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
27+
restore-keys: |
28+
${{ runner.os }}-pip-
29+
${{ runner.os }}-
2230
- name: Install dependencies
2331
run: |
24-
make init
25-
make requirements
2632
pip install -r requirements-dev.txt
2733
- name: Lint
2834
run: |

.github/workflows/publish.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ name: Publish
22

33
on:
44
release:
5-
types: [created]
6-
workflow_dispatch:
5+
types: [published]
76

87
jobs:
98
deploy:
@@ -14,12 +13,14 @@ jobs:
1413
uses: actions/setup-python@v2
1514
with:
1615
python-version: 3.8
17-
- name: Publish package
18-
env:
19-
TWINE_USERNAME: __token__
20-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
16+
- name: Install dependencies
2117
run: |
22-
python -m pip install -U twine wheel
23-
python setup.py sdist bdist_wheel
24-
twine check dist/*
25-
twine upload dist/*
18+
pip install -r requirements-dev.txt
19+
pip install build
20+
- name: Build package
21+
run: python -m build
22+
- name: Publish package to PyPI
23+
uses: pypa/gh-action-pypi-publish@release/v1
24+
with:
25+
user: __token__
26+
password: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)