File tree Expand file tree Collapse file tree 1 file changed +32
-16
lines changed Expand file tree Collapse file tree 1 file changed +32
-16
lines changed Original file line number Diff line number Diff line change @@ -2,32 +2,48 @@ name: Push to PyPi
22
33on :
44 push :
5- branches :
6- - master
5+ tags :
6+ - " v*"
7+ branches : [master]
8+ workflow_dispatch :
79
810jobs :
9- test :
11+ build-n-publish :
1012 runs-on : " ubuntu-latest"
1113
1214 steps :
1315 - name : Checkout source
14- uses : actions/checkout@v2
16+ uses : actions/checkout@master
1517
16- - name : Set up Python 3.8
17- uses : actions/setup-python@v1
18+ - name : Set up Python 3.9
19+ uses : actions/setup-python@v2
1820 with :
19- python-version : 3.8
21+ python-version : 3.9
2022
21- - name : Install build dependencies
22- run : python -m pip install build wheel
23+ - name : Install pypa/build
24+ run : >-
25+ python -m
26+ pip install
27+ build
28+ --user
29+ - name : Build a binary wheel and a source tarball
30+ run : >-
31+ python -m
32+ build
33+ --sdist
34+ --wheel
35+ --outdir dist/
36+ .
2337
24- - name : Build distributions
25- shell : bash -l {0}
26- run : python setup.py sdist bdist_wheel
38+ - name : Publish distribution 📦 to Test PyPI
39+ uses : pypa/gh-action-pypi-publish@master
40+ with :
41+ skip_existing : true
42+ password : ${{ secrets.TEST_PYPI_TOKEN }}
43+ repository_url : https://test.pypi.org/legacy/
2744
28- - name : Publish package to PyPI
29- if : github.repository == 'automl/Auto-PyTorch' && github. event_name == 'push' && startsWith(github.ref, 'refs/tags')
45+ - name : Publish distribution 📦 to PyPI
46+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
3047 uses : pypa/gh-action-pypi-publish@master
3148 with :
32- user : __token__
33- password : ${{ secrets.pypi_token }}
49+ password : ${{ secrets.PYPI_TOKEN }}
You can’t perform that action at this time.
0 commit comments