File tree Expand file tree Collapse file tree 3 files changed +33
-11
lines changed Expand file tree Collapse file tree 3 files changed +33
-11
lines changed Original file line number Diff line number Diff line change @@ -28,24 +28,29 @@ jobs:
28
28
fetch-depth : 0
29
29
persist-credentials : false
30
30
31
+ - name : Build and Check Package
32
+ uses : hynek/build-and-inspect-python-package@v1.5
33
+
34
+ - name : Download Package
35
+ uses : actions/download-artifact@v3
36
+ with :
37
+ name : Packages
38
+ path : dist
39
+
40
+ - name : Publish package to PyPI
41
+ uses : pypa/gh-action-pypi-publish@release/v1
42
+ with :
43
+ password : ${{ secrets.pypi_token }}
44
+
31
45
- name : Set up Python
32
46
uses : actions/setup-python@v4
33
47
with :
34
48
python-version : " 3.7"
35
49
36
- - name : Install dependencies
50
+ - name : Install tox
37
51
run : |
38
52
python -m pip install --upgrade pip
39
- pip install --upgrade build tox
40
-
41
- - name : Build package
42
- run : |
43
- python -m build
44
-
45
- - name : Publish package to PyPI
46
- uses : pypa/gh-action-pypi-publish@release/v1
47
- with :
48
- password : ${{ secrets.pypi_token }}
53
+ pip install --upgrade tox
49
54
50
55
- name : Publish GitHub release notes
51
56
env :
Original file line number Diff line number Diff line change 18
18
env :
19
19
PYTEST_ADDOPTS : " --color=yes"
20
20
21
+ # Cancel running jobs for the same workflow and branch.
22
+ concurrency :
23
+ group : ${{ github.workflow }}-${{ github.ref }}
24
+ cancel-in-progress : true
25
+
21
26
# Set permissions at the job level.
22
27
permissions : {}
23
28
@@ -189,3 +194,10 @@ jobs:
189
194
fail_ci_if_error : true
190
195
files : ./coverage.xml
191
196
verbose : true
197
+
198
+ check-package :
199
+ runs-on : ubuntu-latest
200
+ steps :
201
+ - uses : actions/checkout@v3
202
+ - name : Build and Check Package
203
+ uses : hynek/build-and-inspect-python-package@v1.5
Original file line number Diff line number Diff line change @@ -114,3 +114,8 @@ template = "changelog/_template.rst"
114
114
115
115
[tool .black ]
116
116
target-version = [' py37' ]
117
+
118
+ # check-wheel-contents is executed by the build-and-inspect-python-package action.
119
+ [tool .check-wheel-contents ]
120
+ # W009: Wheel contains multiple toplevel library entries
121
+ ignore = " W009"
You can’t perform that action at this time.
0 commit comments