Bump pypa/gh-action-pypi-publish from 1.8.6 to 1.8.8 #128
Workflow file for this run
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: CI | |
# run on all pushes, pull requests to master, and allow manual runs | |
on: | |
push: | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install | |
run: | | |
pip install pycodestyle pytest pytest-cov sphinx sphinx_rtd_theme | |
pip install . | |
- name: Style check | |
run: find . -name "*.py" -exec pycodestyle --ignore E501,W503 {} + | |
docs: | |
runs-on: ubuntu-latest | |
# only run when tests succeed on the master branch | |
needs: test | |
# run on master branch or tags | |
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
architecture: x64 | |
- name: Install | |
run: | | |
pip install pycodestyle pytest pytest-cov sphinx sphinx_rtd_theme | |
pip install . | |
- name: Build | |
run: | | |
make -C docs/ html | |
touch docs/_build/html/.nojekyll | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3.9.3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/_build/html | |
pypi: | |
runs-on: ubuntu-latest | |
needs: [test, docs] | |
# run on tags | |
if: startsWith(github.ref, 'refs/tags') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
architecture: x64 | |
- name: Build | |
run: | | |
pip install wheel | |
python setup.py sdist bdist_wheel | |
- name: Deploy | |
uses: pypa/gh-action-pypi-publish@v1.8.8 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} |