Skip to content

Commit 3b211ec

Browse files
author
Mark Beacom
authored
Add Github action for pypi build/publishing (#77)
Adjust action
1 parent 2af29d9 commit 3b211ec

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Python package
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build-deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v1
13+
- name: Set up Python
14+
uses: actions/setup-python@v1
15+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
16+
with:
17+
python-version: '3.7'
18+
architecture: 'x64'
19+
- name: Install dependencies
20+
if: success()
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install pipenv
24+
pipenv install --dev --pre --system --deploy
25+
- name: Build and publish the pypi package
26+
if: success()
27+
run: python3 setup.py upload
28+
env:
29+
TWINE_USER: __token__
30+
TWINE_PASS: ${{ secrets.pypi_token }}

0 commit comments

Comments
 (0)