Skip to content

Commit 36325e0

Browse files
committed
add workflows
1 parent b6aa80a commit 36325e0

File tree

4 files changed

+52
-39
lines changed

4 files changed

+52
-39
lines changed

.github/main.workflow

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/deploy.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deploy
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
deploy:
8+
name: Deploy
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
13+
- name: Setup Python
14+
uses: actions/setup-python@v1
15+
16+
- name: Install dependencies
17+
run: |
18+
pip install -U pipenv
19+
pipenv install --dev --deploy
20+
21+
- name: Run tests
22+
run: pipenv run tests
23+
24+
- name: Build distribution
25+
run: pipenv run build
26+
27+
- name: Publish distribution to PyPI
28+
uses: pypa/gh-action-pypi-publish@master
29+
with:
30+
user: ${{ secrets.PYPI_USERNAME }}
31+
password: ${{ secrets.PYPI_PASSWORD }}

.github/workflows/test.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Test
2+
on: push
3+
4+
jobs:
5+
test:
6+
name: Test
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
11+
- name: Setup Python
12+
uses: actions/setup-python@v1
13+
14+
- name: Install dependencies
15+
run: |
16+
pip install -U pipenv
17+
pipenv install --dev --deploy
18+
19+
- name: Run tests
20+
run: pipenv run tests

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ mypy = "*"
1414
python_version = "3.7"
1515

1616
[scripts]
17+
build = "python setup.py sdist bdist_wheel"
1718
mypy = "mypy ."
1819
tests = "python -m pytest"

0 commit comments

Comments
 (0)