This repository was archived by the owner on Jan 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +54
-50
lines changed Expand file tree Collapse file tree 4 files changed +54
-50
lines changed Original file line number Diff line number Diff line change @@ -108,44 +108,6 @@ jobs:
108108 # Must be relative path from root
109109 paths :
110110 - dist-<< parameters.python_version >>
111-
112- publish-release-pypi :
113- parameters :
114- python_version :
115- default : " 2.7"
116- type : string
117- executor :
118- name : container_versions
119- python_version : <<parameters.python_version>>
120- working_directory : ~/repo
121- steps :
122- - attach_workspace :
123- # Must be absolute path or relative path from working_directory
124- at : .
125-
126- - run :
127- name : Install twine
128- command : pip install twine
129-
130- - run :
131- name : Create a .pypirc
132- command : |
133- echo -e "[pypi]" >> ~/.pypirc
134- echo -e "username = __token__" >> ~/.pypirc
135- echo -e "password = $PYPI_TOKEN" >> ~/.pypirc
136- echo -e "[testpypi]" >> ~/.pypirc
137- echo -e "username = __token__" >> ~/.pypirc
138- echo -e "password = $TESTPYPI_TOKEN" >> ~/.pypirc
139-
140- - run :
141- name : Upload with twine to Test PyPI
142- command : twine upload --skip-existing -r testpypi dist-<< parameters.python_version >>/*
143-
144- - run :
145- name : Upload with twine to PyPI
146- command : twine upload -r pypi dist-<< parameters.python_version >>/*
147-
148-
149111
150112workflows :
151113 version : 2
@@ -161,19 +123,10 @@ workflows:
161123 - ' 3.7'
162124 - ' 3.8'
163125 - ' 3.9.0rc2'
164- filters : # required since `publish-release-pypi` has tag filters AND requires `build`
126+ filters :
165127 tags :
166128 only : /.*/
167129 - build
168- - publish-release-pypi :
169- requires :
170- - build-2.7
171- python_version : " 2.7"
172- filters :
173- tags :
174- only : /^v.*/
175- branches :
176- ignore : /.*/
177130
178131 nightly :
179132 triggers :
Original file line number Diff line number Diff line change 1- name-template : ' Version $NEXT_PATCH_VERSION🌈 '
1+ name-template : ' Version $NEXT_PATCH_VERSION'
22tag-template : ' v$NEXT_PATCH_VERSION'
33categories :
44 - title : ' 🚀Features'
@@ -10,7 +10,7 @@ categories:
1010 - ' fix'
1111 - ' bugfix'
1212 - ' bug'
13- - title : ' 🧰 Maintenance'
13+ - title : ' Maintenance'
1414 label : ' chore'
1515change-template : ' - $TITLE @$AUTHOR (#$NUMBER)'
1616exclude-labels :
Original file line number Diff line number Diff line change 1+ name : Publish Pypi
2+ on :
3+ release :
4+ types : [published]
5+
6+ jobs :
7+ publish :
8+ name : publish
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@master
12+ - name : Set up Python 2.7
13+ uses : actions/setup-python@v1
14+ with :
15+ python-version : 2.7
16+
17+ - name : Install twine
18+ run : |
19+ pip install twine
20+
21+ - name : Install wheel
22+ run : |
23+ pip install wheel
24+
25+ - name : Create a source distribution
26+ run : |
27+ python setup.py sdist
28+
29+ - name : Create a wheel
30+ run : |
31+ python setup.py bdist_wheel
32+
33+ - name : Create a .pypirc
34+ run : |
35+ echo -e "[pypi]" >> ~/.pypirc
36+ echo -e "username = __token__" >> ~/.pypirc
37+ echo -e "password = ${{ secrets.PYPI_TOKEN }}" >> ~/.pypirc
38+ echo -e "[testpypi]" >> ~/.pypirc
39+ echo -e "username = __token__" >> ~/.pypirc
40+ echo -e "password = ${{ secrets.TESTPYPI_TOKEN }}" >> ~/.pypirc
41+
42+ - name : Publish to Test PyPI
43+ if : github.event_name == 'release'
44+ run : |
45+ twine upload --skip-existing -r testpypi dist/*
46+
47+ - name : Publish to PyPI
48+ if : github.event_name == 'release'
49+ run : |
50+ twine upload -r pypi dist/*
Original file line number Diff line number Diff line change 22__pycache__ /
33* .py [cod ]
44* $py.class
5+ .idea /
56
67# C extensions
78* .so
You can’t perform that action at this time.
0 commit comments