File tree Expand file tree Collapse file tree 2 files changed +40
-45
lines changed Expand file tree Collapse file tree 2 files changed +40
-45
lines changed Original file line number Diff line number Diff line change 5
5
pull_request :
6
6
7
7
jobs :
8
- build :
8
+ test :
9
9
runs-on : ubuntu-20.04
10
10
name : " python ${{ matrix.python-version }} ${{ matrix.toxenv }}"
11
11
strategy :
50
50
- uses : codecov/codecov-action@v1
51
51
with :
52
52
env_vars : OS,PYTHON,TOXENV
53
+
54
+ publish :
55
+ name : Build and publish Python distributions to PyPI and TestPyPI
56
+ needs :
57
+ - test
58
+ runs-on : ubuntu-18.04
59
+ steps :
60
+ - uses : actions/checkout@master
61
+ - name : Set up Python 3.7
62
+ uses : actions/setup-python@v1
63
+ with :
64
+ python-version : 3.7
65
+ - name : Install pypa/build
66
+ run : >-
67
+ python -m
68
+ pip install
69
+ build
70
+ --user
71
+ - name : Build a binary wheel and a source tarball
72
+ run : >-
73
+ python -m
74
+ build
75
+ --sdist
76
+ --wheel
77
+ --outdir dist/
78
+ - name : Publish distribution to Test PyPI
79
+ if : github.ref == 'refs/heads/master'
80
+ uses : pypa/gh-action-pypi-publish@master
81
+ with :
82
+ skip_existing : true
83
+ password : ${{ secrets.TEST_PYPI_API_TOKEN }}
84
+ repository_url : https://test.pypi.org/legacy/
85
+
86
+ - name : Publish distribution to PyPI
87
+ if : startsWith(github.ref, 'refs/tags')
88
+ uses : pypa/gh-action-pypi-publish@master
89
+ with :
90
+ skip_existing : true
91
+ password : ${{ secrets.PYPI_API_TOKEN }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments