Skip to content

Commit 040cb9b

Browse files
authored
Update and rename publish_to_pypi.py to publish_to_pypi.yml
1 parent 3269b30 commit 040cb9b

File tree

2 files changed

+36
-34
lines changed

2 files changed

+36
-34
lines changed

.github/workflows/publish_to_pypi.py

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/publish_to_pypi.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish PyPI
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
build-and-publish:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v2
12+
13+
- name: Set up Python 3.9
14+
uses: actions/setup-python@v2
15+
with:
16+
python-version: 3.9
17+
- name: Install pypa/build
18+
run: >-
19+
python -m
20+
pip install
21+
build
22+
--user
23+
- name: Build a binary wheel and a source tarball
24+
run: >-
25+
python -m
26+
build
27+
--sdist
28+
--wheel
29+
--outdir dist/
30+
.
31+
- name: Publish to PyPI
32+
if: startsWith(github.ref, 'refs/tags')
33+
uses: pypa/gh-action-pypi-publish@master
34+
with:
35+
username: __token__
36+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)