From 90992cbc4dfb87aef90a6e148b93e79abbc8744d Mon Sep 17 00:00:00 2001 From: hjpotter92 Date: Wed, 24 Feb 2021 12:10:51 +0530 Subject: [PATCH] Setup github action workflows for lint and release. --- .github/workflows/lint.yml | 16 ++++++++++++ .github/workflows/publish.yml | 27 ++++++++++++++++++++ .gitignore | 47 +++++++++++++++++++++++++++++++---- 3 files changed, 85 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..4b93f52 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,16 @@ +name: Lint check project + +on: push + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Black Check + uses: jpetrucciani/black-check@20.8b1 + - name: python-isort + uses: isort/isort-action@v0.1.0 + with: + isortVersion: 5.7.0 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..ee08d04 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: Upload package to pypi + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py sdist bdist_wheel bdist_egg + twine upload dist/* diff --git a/.gitignore b/.gitignore index 5467c74..8729a07 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ -# Created by https://www.toptal.com/developers/gitignore/api/emacs,python,pycharm+all,code -# Edit at https://www.toptal.com/developers/gitignore?templates=emacs,python,pycharm+all,code +# Created by https://www.toptal.com/developers/gitignore/api/emacs,intellij+all,vim,code,python,git +# Edit at https://www.toptal.com/developers/gitignore?templates=emacs,intellij+all,vim,code,python,git ### Code ### .vscode/* @@ -22,6 +22,7 @@ tramp # Org-mode .org-id-locations *_archive +ltximg/** # flymake-mode *_flymake.* @@ -59,7 +60,22 @@ flycheck_*.el /network-security.data -### PyCharm+all ### +### Git ### +# Created by git for backups. To disable backups in Git: +# $ git config --global mergetool.keepBackup false +*.orig + +# Created by git when using merge tools for conflicts +*.BACKUP.* +*.BASE.* +*.LOCAL.* +*.REMOTE.* +*_BACKUP_*.txt +*_BASE_*.txt +*_LOCAL_*.txt +*_REMOTE_*.txt + +### Intellij+all ### # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 @@ -132,7 +148,7 @@ fabric.properties # Android studio 3.1+ serialized cache file .idea/caches/build_file_checksums.ser -### PyCharm+all Patch ### +### Intellij+all Patch ### # Ignores the whole .idea folder and all .iml files # See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360 @@ -287,4 +303,25 @@ dmypy.json # profiling data .prof -# End of https://www.toptal.com/developers/gitignore/api/emacs,python,pycharm+all,code +### Vim ### +# Swap +[._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim +Sessionx.vim + +# Temporary +.netrwhist +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + +# End of https://www.toptal.com/developers/gitignore/api/emacs,intellij+all,vim,code,python,git +