ajust github action build #15
This file contains 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: Python package | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
python-version: ["2.7"] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: LizardByte/setup-python-action@master | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
# if [ ${{ matrix.dependency }} == django ]; then pip install Django<2.2; fi | |
pip install -r requirements-dev.txt | |
- name: Run tests | |
run: | | |
make test check coverage | |
codecov | |
- name: Build | |
run: | | |
pip install -U pip wheel setuptools | |
python setup.py sdist bdist_wheel | |
- name: Publish a Python distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
with: | |
user: ${{ secrets.pypi_user }} | |
password: ${{ secrets.pypi_password }} |