File tree Expand file tree Collapse file tree 2 files changed +21
-24
lines changed
Expand file tree Collapse file tree 2 files changed +21
-24
lines changed Original file line number Diff line number Diff line change 1- name : Main
1+ name : Automated Tests
22
33on : [push, pull_request]
44
2020 python -m pip install tox
2121 - name : Run tests
2222 run : tox
23+
24+ release :
25+ needs : test
26+ if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
27+ runs-on : ubuntu-latest
28+
29+ steps :
30+ - uses : actions/checkout@v2
31+ - name : Setup Python
32+ uses : actions/setup-python@v1
33+ with :
34+ python-version : 3.8
35+ - name : Install tox
36+ run : |
37+ python -m pip install tox
38+ - name : Release
39+ run : tox -e release
40+ env :
41+ TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
42+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -70,26 +70,3 @@ stages:
7070 testResultsFiles : ' **/test-results.xml'
7171 testRunTitle : ' Python $(python.version)'
7272 condition : succeededOrFailed()
73-
74- - stage : Publish
75- dependsOn : Test
76- jobs :
77- - job : ' Publish'
78-
79- steps :
80- - task : UsePythonVersion@0
81- inputs :
82- versionSpec : ' 3.8'
83- architecture : ' x64'
84-
85- - script : python -m pip install tox
86- displayName : ' Install tox'
87-
88- - script : |
89- tox -e release
90- env:
91- TWINE_PASSWORD: $(PyPI-token)
92- GITHUB_TOKEN: $(Github-token)
93- displayName: 'publish to PyPI'
94-
95- condition : contains(variables['Build.SourceBranch'], 'tags')
You can’t perform that action at this time.
0 commit comments