Skip to content

Publish

Publish #21

Workflow file for this run

name: Publish
on:
workflow_dispatch:
push:
branches: [master]
defaults:
run:
shell: bash
jobs:
deploy:
name: Publish
runs-on: self-hosted
steps:
- name: Checkout branch
uses: actions/checkout@v5.0.0
with:
fetch-depth: 0
- name: Install dependencies
run: |
python3 -m venv venv
source venv/bin/activate
python3 -m pip install -U pip poetry
poetry --version
poetry check --no-interaction
poetry config virtualenvs.in-project true
poetry install --no-interaction
- name: Run tests
run: |
poetry run pytest -v
- name: Build package
run: |
poetry build --no-interaction
- name: Publish to PyPi
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build --no-interaction