diff --git a/.github/workflows/lint_and_package.yml b/.github/workflows/lint_and_package.yml new file mode 100644 index 0000000..d7df281 --- /dev/null +++ b/.github/workflows/lint_and_package.yml @@ -0,0 +1,36 @@ +name: Lint +on: [push] +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: actions/setup-python@v1 + with: + python-version: 3.7 + - name: Install flake8 + run: pip install flake8 + - name: Flake8 + run: flake8 checkcel --ignore=E501,W504 + + pypi: + runs-on: ubuntu-latest + needs: lint + name: Deploy release to Pypi + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: actions/setup-python@v1 + with: + python-version: 3.7 + - name: Python install + run: pip install -U pip setuptools nose build + - name: Build a binary wheel and a source tarball + run: python -m build --sdist --wheel --outdir dist/ . + - name: Publish distribution 📦 to PyPI + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.PYPI_API_KEY }}