File tree Expand file tree Collapse file tree 2 files changed +64
-51
lines changed
Expand file tree Collapse file tree 2 files changed +64
-51
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [master]
6+ tags : ['v*']
7+ pull_request :
8+ branches : [master]
9+
10+ jobs :
11+ test :
12+ runs-on : ubuntu-latest
13+ environment : ci
14+ strategy :
15+ matrix :
16+ python-version : ['3.8', '3.9', '3.10', '3.11']
17+
18+ steps :
19+ - uses : actions/checkout@v3
20+ with :
21+ fetch-depth : 0
22+
23+ - name : Set up Python ${{ matrix.python-version }}
24+ uses : actions/setup-python@v4
25+ with :
26+ python-version : ${{ matrix.python-version }}
27+ cache : ' pip'
28+
29+ - name : Install pandoc
30+ run : |
31+ sudo apt-get update
32+ sudo apt-get install pandoc
33+ pip install pypandoc
34+
35+ - name : Install npm
36+ run : |
37+ npm install -g npm@latest || npm install -g npm@9
38+
39+ - name : Install dependencies
40+ run : pip install 'tox<4'
41+
42+ - name : Run tests
43+ run : tox
44+
45+ - name : Install release dependencies
46+ if : github.ref == 'refs/heads/master' && matrix.python-version == '3.8'
47+ run : |
48+ pip install bump-my-version
49+ npm install -g --save-dev \
50+ @semantic-release/changelog \
51+ @semantic-release/exec \
52+ @semantic-release/git \
53+ @semantic-release/github
54+
55+ - name : Semantic Release
56+ if : github.ref == 'refs/heads/master' && matrix.python-version == '3.8'
57+ run : npx semantic-release
58+
59+ - name : Publish to PyPI
60+ if : startsWith(github.ref, 'refs/tags/') && matrix.python-version == '3.8'
61+ run : |
62+ pip install build twine
63+ python -m build
64+ python -m twine upload dist/* -u __token__ -p ${{ secrets.PYPI_TOKEN }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments