Skip to content

Commit d942c8e

Browse files
authored
Merge pull request #12 from kozistr/feature/workflow
[Feature] Setup workflow
2 parents 205fc11 + 326bf02 commit d942c8e

File tree

2 files changed

+25
-20
lines changed

2 files changed

+25
-20
lines changed

.github/workflows/python-package.yml renamed to .github/workflows/ci.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,3 @@ jobs:
2727
- name: Lint
2828
run: |
2929
make format
30-
make build
31-
deploy:
32-
name: Deploy
33-
needs: test
34-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
35-
runs-on: ubuntu-latest
36-
steps:
37-
- name: Setup Python 3.8
38-
uses: actions/setup-python@v2
39-
with:
40-
python-version: 3.8
41-
- name: Upload to PyPI
42-
env:
43-
TWINE_USERNAME: __token__
44-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
45-
run: |
46-
python -m pip install -U twine wheel
47-
python setup.py sdist bdist_wheel
48-
twine check dist/*
49-
twine upload dist/*

.github/workflows/publish.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI
2+
3+
on:
4+
release:
5+
types: [created]
6+
workflow_dispatch:
7+
8+
jobs:
9+
deploy:
10+
name: Deploy
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Setup Python 3.8
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: 3.8
17+
- name: Publish package
18+
env:
19+
TWINE_USERNAME: __token__
20+
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)