File tree Expand file tree Collapse file tree 2 files changed +14
-19
lines changed
Expand file tree Collapse file tree 2 files changed +14
-19
lines changed Original file line number Diff line number Diff line change @@ -2,38 +2,27 @@ name: publish
22
33on :
44 release :
5- types : [created]
5+ types :
6+ - published
67
78jobs :
89 pypi :
910 runs-on : ubuntu-latest
1011
1112 steps :
12- - name : Set up python
13- uses : actions/setup-python@v2
14- with :
15- python-version : " 3.6"
16-
17- - name : Upgrade pip
18- run : python -m pip install --upgrade pip
19-
20- - name : Upgrade or install additional system packages
21- run : pip install --upgrade setuptools virtualenv wheel
22-
2313 - name : Checkout repository
2414 uses : actions/checkout@v2
2515 with :
2616 fetch-depth : 0
2717
28- - name : Install pep517 and twine
29- run : pip install pep517 twine
30-
31- - name : Build source and binary
32- run : python -m pep517.build --source --binary .
18+ - name : Setup development environment
19+ uses : ./.github/actions/setup-dev-env
20+ with :
21+ python-version : " 3.7"
3322
34- - name : Upload to PyPI
23+ - name : Run unit tests
3524 env :
3625 TWINE_REPOSITORY : pypi
3726 TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
3827 TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
39- run : twine upload dist/*
28+ run : doit publish
Original file line number Diff line number Diff line change @@ -72,3 +72,9 @@ def task_publishable():
7272 ["check-wheel-contents" , HERE / "dist" ],
7373 ],
7474 )
75+
76+
77+ def task_publish ():
78+ task = task_publishable ()
79+ task ["actions" ].append (["twine" , "upload" , * list ((HERE / "dist" ).glob ("*" ))])
80+ return task
You can’t perform that action at this time.
0 commit comments