Skip to content

Commit 0f87b92

Browse files
authored
Update publish.yml
1 parent e42dc75 commit 0f87b92

File tree

1 file changed

+31
-6
lines changed

1 file changed

+31
-6
lines changed

.github/workflows/publish.yml

+31-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
1-
- name: Publish package
2-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
3-
uses: pypa/gh-action-pypi-publish@master
4-
with:
5-
user: __token__
6-
password: ${{ secrets.pypi_password }}
1+
name: Upload Python Package
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v1
12+
13+
- name: Set up Python
14+
uses: actions/setup-python@v1
15+
with:
16+
python-version: '3.6'
17+
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install setuptools wheel twine
22+
23+
- name: Build
24+
run: |
25+
python setup.py sdist bdist_wheel
26+
27+
- name: Publish
28+
uses: pypa/gh-action-pypi-publish@master
29+
with:
30+
user: __token__
31+
password: ${{ secrets.pypi_password }}

0 commit comments

Comments
 (0)