File tree Expand file tree Collapse file tree 2 files changed +42
-2
lines changed
Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Original file line number Diff line number Diff line change @@ -44,11 +44,52 @@ jobs:
4444 python -m poetry run coverage run --omit="/home/circleci/.cache/pypoetry/virtualenvs" -m pytest
4545 python -m poetry run coverage report
4646
47+ # This is the definition of another job, the one we use to publish the package to PyPI
48+ deployment :
49+
50+ # Same environment
51+ docker :
52+ - image : circleci/python:3.7
53+
54+ steps :
55+
56+ # Gets the code
57+ - checkout
58+
59+ # Use `poetry publish` to Publish the package using username and password from CircleCI environment variables
60+ # Which can be configured inside CircleCI's interface
61+ - run :
62+ name : Push to PyPI
63+ command : |
64+ poetry publish --build --username "${PYPI_USERNAME}" --password "${PYPI_PASSWORD}" --no-interaction
65+
4766# In the workflows section, we specify when we want to run the jobs defined
4867workflows :
4968 version : 2
5069
5170 # The build-and-test we will run EVERYTIME a piece of code changes
5271 build-and-test-workflow :
5372 jobs :
54- - build-and-test
73+ - build-and-test
74+
75+ # The deployment workflow publishes the package
76+ deployment-workflow :
77+ jobs :
78+
79+ # Runs build and test, but now just on Git tags (created from a GitHub release)
80+ - build-and-test :
81+ filters :
82+ tags :
83+ only : /v[0-9]+(\.[0-9]+)*/
84+ branches :
85+ ignore : /.*/
86+
87+ # Runs the deployment job, just with the tags as well
88+ - deployment :
89+ requires :
90+ - build-and-test
91+ filters :
92+ tags :
93+ only : /v[0-9]+(\.[0-9]+)*/
94+ branches :
95+ ignore : /.*/
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ classifiers = [
1616 " Natural Language :: English" ,
1717 " Intended Audience :: Developers" ,
1818 " Programming Language :: Python" ,
19- " Programming Language :: Python :: 3.6" ,
2019 " Programming Language :: Python :: 3.7" ,
2120 " Programming Language :: Python :: 3.8" ,
2221 " Programming Language :: Python :: 3.9" ,
You can’t perform that action at this time.
0 commit comments