File tree Expand file tree Collapse file tree 1 file changed +33
-9
lines changed Expand file tree Collapse file tree 1 file changed +33
-9
lines changed Original file line number Diff line number Diff line change 2323 - name : Upload source distribution
2424 uses : actions/upload-artifact@v3
2525 with :
26- name : sdist
27- path : " dist/*.tar.gz"
28- if-no-files-found : error
29- - name : Upload wheel
30- uses : actions/upload-artifact@v3
31- with :
32- name : wheel
33- path : " dist/*.whl"
26+ name : build-output
27+ path : " dist/*"
3428 if-no-files-found : error
3529
3630 test :
7468 - name : Download wheel
7569 uses : actions/download-artifact@v3
7670 with :
77- name : wheel
71+ name : build-output
7872 path : dist/
7973
8074 - name : Install wheel
8579 - name : Test with pytest
8680 run : |
8781 pytest
82+
83+ deploy :
84+ runs-on : ubuntu-latest
85+ needs : [build, test]
86+
87+ steps :
88+ - name : Download artifacts
89+ uses : actions/download-artifact@v3
90+ with :
91+ name : build-output
92+ path : dist/
93+
94+ - name : Deploy to Test PyPI
95+ uses : pypa/gh-action-pypi-publish@release/v1
96+ if : startsWith(github.ref, 'refs/head/master')
97+ with :
98+ password : ${{ secrets.TEST_PYPI_API_TOKEN }}
99+ repository_url : https://test.pypi.org/legacy/
100+
101+ - name : Release
102+ uses : softprops/action-gh-release@v1
103+ if : startsWith(github.ref, 'refs/tags/v')
104+ with :
105+ files : dist/*
106+
107+ - name : Deploy to PyPI
108+ uses : pypa/gh-action-pypi-publish@release/v1
109+ if : startsWith(github.ref, 'refs/tags/v')
110+ with :
111+ password : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments