File tree Expand file tree Collapse file tree 1 file changed +48
-12
lines changed
Expand file tree Collapse file tree 1 file changed +48
-12
lines changed Original file line number Diff line number Diff line change 1- name : Python package
1+ name : CI for Cool-Graph
22
3- on : [push]
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+ release :
11+ types : [published]
412
513jobs :
614 build :
715 runs-on : ubuntu-latest
16+
817 steps :
9- - uses : actions/checkout@v2
10- - name : Set up Python
18+ - name : Check out code
19+ uses : actions/checkout@v2
20+
21+ - name : Set up Python 3.8
1122 uses : actions/setup-python@v2
1223 with :
1324 python-version : 3.8
25+
1426 - name : Install dependencies
1527 run : |
1628 python -m pip install --upgrade pip
17- pip install build
18- - name : Build a source tarball
19- if : startsWith(github.ref, 'refs/tags')
29+ pip install -r requirements.txt
30+
31+ - name : Run tests
2032 run : |
21- pipenv run python setup.py sdist
22- - name : Publish distribution 📦 to PyPI
23- if : startsWith(github.ref, 'refs/tags')
24- uses : pypa/gh-action-pypi-publish@release/v1
33+ pytest
34+
35+ release :
36+ runs-on : ubuntu-latest
37+ needs : build
38+
39+ steps :
40+ - name : Check out code
41+ uses : actions/checkout@v2
42+
43+ - name : Set up Python 3.8
44+ uses : actions/setup-python@v2
2545 with :
26- password : ${{ secrets.PYPI_API_TOKEN }}
46+ python-version : 3.8
47+
48+ - name : Install dependencies
49+ run : |
50+ python -m pip install --upgrade pip
51+ pip install setuptools wheel twine
52+
53+ - name : Build package
54+ run : |
55+ python setup.py sdist bdist_wheel
56+
57+ - name : Publish to PyPI
58+ env :
59+ TWINE_USERNAME : __token__
60+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
61+ run : |
62+ python -m twine upload dist/*
You can’t perform that action at this time.
0 commit comments