Skip to content

Commit

Permalink
- add github publish
Browse files Browse the repository at this point in the history
  • Loading branch information
s00d committed Feb 18, 2021
1 parent 0a8d987 commit 305fc95
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/Deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Python publish

on:
release:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: |
python -m unittest test
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
python3 -m twine upload --skip-existing --repository pypi dist/*

0 comments on commit 305fc95

Please sign in to comment.