File tree Expand file tree Collapse file tree 2 files changed +46
-14
lines changed
Expand file tree Collapse file tree 2 files changed +46
-14
lines changed Original file line number Diff line number Diff line change 1+ name : Release Workflow
2+
3+ on :
4+ push :
5+ tags :
6+ - ' nevertag'
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Check out code
14+ uses : actions/checkout@v2
15+
16+ - name : Install Poetry
17+ run : |
18+ curl -sSL https://install.python-poetry.org | python -
19+
20+ - name : Set up Python
21+ uses : actions/setup-python@v2
22+ with :
23+ python-version : ' 3.x'
24+
25+ - name : Install Dependencies
26+ run : |
27+ poetry install
28+
29+ - name : Install testing
30+ run : |
31+ python -m pip install --upgrade pip
32+ pip install pytest pandas coverage coverage-badge
33+
34+ - name : Run tests
35+ run : |
36+ coverage run -m pytest ./tests/api/
37+
38+ - name : Build Package
39+ run : |
40+ poetry build
41+
42+ - name : Publish to PyPI
43+ uses : pypa/gh-action-pypi-publish@master
44+ with :
45+ user : __token__
46+ password : ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change 1717 run : |
1818 curl -sSL https://install.python-poetry.org | python -
1919
20- - name : Create and push tag if on prod branch
21- if : github.ref == 'refs/heads/prod'
22- run : |
23- VERSION=$(poetry version -s)
24- git tag $VERSION
25- git push origin $VERSION
26-
27- - name : Create and push test tag if on test branch
28- if : github.ref == 'refs/heads/test'
29- run : |
30- VERSION=$(poetry version -s)
31- git tag testvers
32- git push origin testvers
33-
3420 - name : Install Pandoc
3521 run : |
3622 sudo apt-get update
You can’t perform that action at this time.
0 commit comments