Merge pull request #13 from ParthS007/new

Add Support of gh-actions
This commit is contained in:
Parth Shandilya
2020-12-29 12:05:34 +01:00
committed by Parth Shandilya
6 changed files with 115 additions and 45 deletions
+4
View File
@@ -0,0 +1,4 @@
# These are supported funding model platforms
github: ParthS007
patreon: parthshandilya
ko_fi: parthshandilya
+28
View File
@@ -0,0 +1,28 @@
name: CI
on:
push:
branches: master
pull_request:
branches: master
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Check python code formatting
run: |
pip install black
black --check .
- name: Check compliance with pep8, pyflakes and circular complexity
run: |
pip install flake8
flake8 .
+31
View File
@@ -0,0 +1,31 @@
name: Publish
on:
push:
tags:
- v*
jobs:
Publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: pip install setuptools wheel
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Publish on PyPI
uses: pypa/gh-action-pypi-publish@v1.4.1
with:
user: __token__
password: ${{ secrets.pypi_token }}