File tree Expand file tree Collapse file tree 4 files changed +62
-23
lines changed Expand file tree Collapse file tree 4 files changed +62
-23
lines changed Original file line number Diff line number Diff line change 57
57
env_vars : OS,PYTHON
58
58
name : codecov-umbrella
59
59
fail_ci_if_error : false
60
-
61
- distribution :
62
- runs-on : ubuntu-latest
63
- needs : [pytest]
64
-
65
- steps :
66
- - uses : actions/checkout@v3
67
- - name : Build distributions
68
- run : |
69
- $CONDA/bin/python -m pip install build
70
- $CONDA/bin/python -m build
71
- - name : Publish a Python distribution to PyPI
72
- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
73
- uses : pypa/gh-action-pypi-publish@release/v1
74
- with :
75
- user : __token__
76
- password : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change
1
+ name : Publish to PyPI
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches :
7
+ - main
8
+ release :
9
+ types :
10
+ - published
11
+
12
+ jobs :
13
+ packages :
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - uses : actions/checkout@v3
17
+
18
+ - name : Set up Python
19
+ uses : actions/setup-python@v4
20
+ with :
21
+ python-version : " 3.x"
22
+
23
+ - name : Get tags
24
+ run : git fetch --depth=1 origin +refs/tags/*:refs/tags/*
25
+ shell : bash
26
+
27
+ - name : Install build tools
28
+ run : |
29
+ python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine
30
+ shell : bash
31
+
32
+ - name : Build binary wheel
33
+ run : python -m build --sdist --wheel . --outdir dist
34
+
35
+ - name : CheckFiles
36
+ run : |
37
+ ls dist
38
+ shell : bash
39
+
40
+ - name : Test wheels
41
+ run : |
42
+ cd dist && python -m pip install oceanspy*.whl
43
+ python -m twine check *
44
+ python -c "import oceanspy; print(f'oceanspy v{oceanspy.__version__}')"
45
+ shell : bash
46
+
47
+ - name : Publish a Python distribution to PyPI
48
+ if : success() && github.event_name == 'release'
49
+ uses : pypa/gh-action-pypi-publish@release/v1
50
+ with :
51
+ user : __token__
52
+ password : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change 1
- include AUTHORS.rst
2
1
include CONTRIBUTING.rst
3
2
include HISTORY.rst
4
- include LICENSE
5
3
include README.rst
4
+ include LICENSE
5
+
6
+ graft oceanspy
6
7
7
- recursive-include oceanspy/tests *
8
- recursive-exclude * __pycache__
9
- recursive-exclude * *.py[co]
8
+ prune assets
9
+ prune docs
10
+ prune binder
11
+ prune paper
12
+ prune sciserver_catalogs/
13
+ prune *.egg-info
10
14
11
15
recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ testpaths = ["oceanspy/tests"]
36
36
addopts = " -v --cov"
37
37
38
38
[tool .setuptools ]
39
- py-modules = [" oceanspy" ]
39
+ packages = [" oceanspy" ]
40
40
41
41
[tool .setuptools_scm ]
42
42
write_to = " oceanspy/version.py"
You can’t perform that action at this time.
0 commit comments