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 11name : test (python 2.7)
22
33on :
4+ push :
5+ branches : [master]
46 pull_request :
57 branches : [master]
68
Original file line number Diff line number Diff line change 1- name : test and bump
1+ name : test, bump and publish
22
33on :
44 push :
7878 run : |
7979 sha_new=$(git rev-parse HEAD)
8080 echo $sha_new
81- echo "::set-output name=SHA::$sha_new"
81+ echo "::set-output name=SHA::$sha_new"
82+
83+ publish :
84+ needs : bump
85+ if : ${{ github.event_name == 'push' }}
86+ runs-on : ubuntu-latest
87+ steps :
88+ - name : Checkout
89+ uses : actions/checkout@v4
90+ with :
91+ fetch-depth : 0
92+ ref : ${{ needs.bump.outputs.new_sha }}
93+
94+ - name : Set up Python
95+ uses : actions/setup-python@v5
96+ with :
97+ python-version : ' 3.11'
98+
99+ - name : Install python dependencies
100+ run : |
101+ python -m pip install --upgrade pip
102+ pip install setuptools twine wheel coveralls
103+ pip install -e .[all]
104+
105+ - name : Show python dependencies
106+ run : |
107+ pip freeze
108+
109+ - name : Build package
110+ run : |
111+ mkdir clean-build
112+ python setup.py sdist bdist_wheel --universal --dist-dir ./clean-build
113+
114+ - name : Publish package
115+ uses : pypa/gh-action-pypi-publish@v1.3.1
116+ with :
117+ user : __token__
118+ password : ${{ secrets.pypi_token }}
119+ packages_dir : clean-build/
You can’t perform that action at this time.
0 commit comments