Skip to content

Commit 3b19dfa

Browse files
authored
Merge pull request #13 from kozistr/fix/workflow
[Fix] workflows
2 parents d942c8e + acb6f79 commit 3b19dfa

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
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: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
name: CI
1+
name: Publish
22

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

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

0 commit comments

Comments
 (0)