File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ name : release-pipeline
2+
3+ on :
4+ release :
5+ types :
6+ - created
7+
8+
9+ jobs :
10+ release-job :
11+ runs-on : ubuntu-latest
12+ env :
13+ PYPI_TOKEN : ${{ secrets.PYPI_TOKEN }}
14+ steps :
15+ - uses : actions/checkout@v2
16+ with :
17+ fetch-depth : 0
18+ - name : Set up Python
19+ uses : actions/setup-python@v2
20+ with :
21+ python-version : 3.9
22+ - name : Install dependencies
23+ run : |
24+ pip install -r requirements.txt
25+ pip install -r requirements-dev.txt
26+ - name : Test with pytest
27+ run : |
28+ pytest --cov=./mcbackend --cov-report term-missing mcbackend/
29+ - name : Build package
30+ run : |
31+ python setup.py sdist bdist_wheel
32+ - name : Check version number match
33+ run : |
34+ echo "GITHUB_REF: ${GITHUB_REF}"
35+ # Make sure the package version is the same as the tag
36+ grep -Rq "^Version: ${GITHUB_REF:11}$" mcbackend.egg-info/PKG-INFO
37+ - name : Publish to PyPI
38+ run : |
39+ twine check dist/*
40+ twine upload --repository pypi --username __token__ --password ${PYPI_TOKEN} dist/*
41+ - name : Test installation
42+ run : |
43+ sleep 120
44+ pip install mcbackend==${GITHUB_REF:11}
Original file line number Diff line number Diff line change 1+ [ ![ PyPI version] ( https://img.shields.io/pypi/v/mcbackend )] ( https://pypi.org/project/mcbackend )
12[ ![ pipeline] ( https://github.com/michaelosthege/mcbackend/workflows/pipeline/badge.svg )] ( https://github.com/michaelosthege/mcbackend/actions )
23[ ![ coverage] ( https://codecov.io/gh/michaelosthege/mcbackend/branch/main/graph/badge.svg )] ( https://codecov.io/gh/michaelosthege/mcbackend )
34
You can’t perform that action at this time.
0 commit comments