Skip to content

Commit 94a589c

Browse files
Add PyPI upload workflow
1 parent e645b16 commit 94a589c

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/pypi_upload.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish Python distributions to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-n-publish:
9+
if: ${{ github.repository == 'ChristopherMayes/pysuperfish' }}
10+
name: Build and publish Python distributions to PyPI
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
- name: Set up Python 3.7
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: 3.7
21+
- name: Install pypa/build
22+
run: >-
23+
python -m
24+
pip install
25+
build
26+
--user
27+
- name: Build a source tarball
28+
run: >-
29+
python -m
30+
build
31+
--sdist
32+
--outdir dist/
33+
.
34+
- name: Publish a Python distribution to PyPI
35+
uses: pypa/gh-action-pypi-publish@release/v1
36+
with:
37+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)