Skip to content

Commit ea204e2

Browse files
committed
Added github workflow
1 parent 24ee6ab commit ea204e2

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
2+
3+
on:
4+
release:
5+
types: [prereleased,released]
6+
7+
jobs:
8+
build-n-publish:
9+
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: "3.8"
17+
- name: Upgrade pip
18+
run: >-
19+
python -m
20+
pip install
21+
pip --upgrade
22+
--user
23+
- name: Install pypi/build
24+
run: >-
25+
python -m
26+
pip install
27+
build
28+
--user
29+
- name: Build a binary wheel and a source tarball
30+
run: >-
31+
python -m
32+
build
33+
--sdist
34+
--wheel
35+
--outdir dist/
36+
.
37+
- name: Publish distribution 📦 to PyPI
38+
if: startsWith(github.ref, 'refs/tags')
39+
uses: pypa/gh-action-pypi-publish@release/v1
40+
with:
41+
password: ${{ secrets.pypi_password }}
42+
verbose: true

0 commit comments

Comments
 (0)