Update LICENSE #47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Python Package | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' | |
| paths-ignore: | |
| - 'README.md' | |
| - 'docs/**' | |
| jobs: | |
| build-and-publish: | |
| 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 build tools and test dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install setuptools wheel twine # Keep these for build/publish | |
| # Install package in editable mode with test extras | |
| pip install -e ".[test]" | |
| - name: Run tests # Run tests before building | |
| run: pytest -v # Use pytest command | |
| - name: Build package | |
| run: python setup.py sdist bdist_wheel | |
| - name: Publish package | |
| # Only publish on tagged commits | |
| if: startsWith(github.ref, 'refs/tags') | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.PYPI_API_TOKEN }} |