adapt CI actions #9
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: Deploy release version to pypi | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'nodeploy')" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.7 | |
- name: Install poetry | |
run: pip install poetry | |
- name: Install requirements | |
run: poetry install | |
- name: Build package | |
run: poetry build | |
- name: Test package | |
run: poetry run pytest | |
- name: Check if already uploaded | |
run: poetry run check_pypi | |
- name: publish to pypi | |
run: poetry publish -u __token__ -p ${{ secrets.PYPI_TOKEN }} |