File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ tags :
7
+ - ' *'
8
+
9
+ jobs :
10
+ build-n-publish :
11
+ name : Build and publish Python 🐍 distributions 📦 to PyPI
12
+ runs-on : ubuntu-latest
13
+ if : github.repository == 'astropy/pytest-doctestplus'
14
+ if : (github.repository == 'astropy/sphinx-astropy' && (github.event_name == 'tags' || contains(github.event.pull_request.labels.*.name, 'Build wheels')))
15
+
16
+ steps :
17
+ - uses : actions/checkout@v2
18
+ with :
19
+ fetch-depth : 0
20
+ - uses : actions/setup-python@v2
21
+ with :
22
+ python-version : 3.8
23
+
24
+ - name : Install python-build and twine
25
+ run : python -m pip install build "twine>=3.3"
26
+
27
+ - name : Build package
28
+ run : python -m build --sdist --wheel .
29
+
30
+ - name : List result
31
+ run : ls -l dist
32
+
33
+ - name : Check long_description
34
+ run : python -m twine check --strict dist/*
35
+
36
+ - name : Test package
37
+ run : |
38
+ cd ..
39
+ python -m venv testenv
40
+ testenv/bin/pip install pytest sphinx-astropy/dist/*.whl
41
+ testenv/bin/pytest sphinx-astropy/tests
42
+
43
+ - name : Publish distribution 📦 to PyPI
44
+ if : startsWith(github.ref, 'refs/tags')
45
+ uses : pypa/gh-action-pypi-publish@release/v1
46
+ with :
47
+ user : __token__
48
+ password : ${{ secrets.pypi_password }}
You can’t perform that action at this time.
0 commit comments