-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (38 loc) · 1.17 KB
/
deploy_to_pipy.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Deploy to PyPI
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Check output
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
run: echo $RELEASE_VERSION
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: pip install flake8 coverage twine
- name: Lint with flake8
run: flake8 . --count --max-complexity=11 --max-line-length=404 --statistics
# - name: Test with pytest and coverage
# run: |
# coverage run -m unittest tests/test_* \
# && coverage report -m
- name: Build package
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
run: python setup.py validate_tag $RELEASE_VERSION && python setup.py sdist
- name: Deploy to PyPi
uses: pypa/gh-action-pypi-publish@v1.4.1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}