Skip to content

Commit eca7191

Browse files
committed
Add workflows to build & release wheels
1 parent 9a52240 commit eca7191

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
on: [push, pull_request]
2+
name: Build Python Package
3+
jobs:
4+
build_package:
5+
runs-on: ubuntu-20.04
6+
7+
steps:
8+
- uses: actions/checkout@v2
9+
- uses: actions/setup-python@v2
10+
- name: Install dependencies
11+
run: |
12+
python -m pip install --upgrade pip
13+
pip install setuptools wheel
14+
- name: Build package
15+
run: |
16+
python setup.py sdist bdist_wheel

.github/workflows/release.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
release:
3+
types: [created]
4+
name: Upload Python Package
5+
jobs:
6+
upload_package:
7+
runs-on: ubuntu-20.04
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-python@v2
11+
- name: Install dependencies
12+
run: |
13+
python -m pip install --upgrade pip
14+
pip install setuptools wheel twine
15+
- name: Build and publish
16+
env:
17+
TWINE_USERNAME: __token__
18+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
19+
run: |
20+
python setup.py sdist bdist_wheel
21+
twine upload dist/*

0 commit comments

Comments
 (0)