Skip to content

[pre-commit.ci] pre-commit autoupdate (#29) #92

[pre-commit.ci] pre-commit autoupdate (#29)

[pre-commit.ci] pre-commit autoupdate (#29) #92

Workflow file for this run

name: main
on: [push, pull_request]
permissions:
contents: read
concurrency:
group: main-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
with:
python-version: 3.10.2
- name: Install
shell: bash -l {0}
run: |
python -m pip install -e ".[test]"
- name: Test
shell: bash -l {0}
run: |
python -m pytest
deploy:
runs-on: ubuntu-20.04
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
environment: PyPi-deploy
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
with:
python-version: 3.10.2
- name: Install requirements and build wheel
shell: bash -l {0}
run: |
python -m pip install build twine
python -m build .
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}