.github/workflows/release.yml

Summary

Maintainability
Test Coverage
name: Release

on:
  push:
    tags:
    - '*'

jobs:
  build:
  
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: Set up Python 3.7
      uses: actions/setup-python@v1
      with:
        python-version: 3.7
    - name: Install dependencies
      run: |
        pip install --upgrade pip setuptools wheel twine
        python setup.py install
    - name: Lint with flake8
      run: |
        pip install flake8
        # stop the build if there are Python syntax errors or undefined names
        flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
        # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
        flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
    - name: Lint with pylint
      run: |
        pip install pylint
        pylint --errors-only *.py noma/*.py tests/*.py
    - name: Test
      run: |
        python tests/test_lnd.py
    - name: Run
      run: |
        noma --version
        noma --help
    - name: Publish to PyPI
      run: |
        python setup.py sdist bdist_wheel
        twine upload --username "${{ secrets.TWINE_USERNAME }}" \
        --password "${{ secrets.TWINE_PASSWORD }}" dist/*
    - name: Github Release
      uses: meeDamian/github-release@v1.0.0
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
        gzip: false
        files: dist/*