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: Upload a new version to the PYPI | |
on: | |
release: | |
types: [created] | |
jobs: | |
check-and-publish: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install and configure poetry | |
uses: snok/install-poetry@v1 | |
- name: Install dependencies | |
run: poetry install --no-interaction | |
- name: Run tests | |
run: make test | |
- name: Set module version and publish it | |
run: | | |
poetry version ${GITHUB_REF_NAME#v} | |
poetry publish --build | |
env: | |
POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_LOGIN }} | |
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |