-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 981 Bytes
/
deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: deployment
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: actions/setup-python@v1
with:
python-version: '3.6'
- name: Install dependencies
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
run: |
python setup.py sdist bdist_wheel
- name: Distribute
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*