Files
pwo/.gitea/workflows/build.yaml
Walter Oggioni 04aae1f976
Some checks failed
CI / build (push) Failing after 40s
switched builder to hostinger
2024-12-01 15:29:34 +08:00

36 lines
984 B
YAML

name: CI
on:
push:
tags:
- '*'
jobs:
build:
runs-on: hostinger
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-python@v5
with:
cache: 'pip'
- name: Create virtualenv
run: |
python -m venv .venv
.venv/bin/pip install -r requirements.txt .
- name: Run mypy
run: .venv/bin/python -m mypy -p src
- name: Run unit tests
run: .venv/bin/python -m unittest discover -s tests
- name: Execute build
run: |
.venv/bin/pyproject-build
- name: Publish artifacts
env:
TWINE_REPOSITORY_URL: ${{ vars.PYPI_REGISTRY_URL }}
TWINE_USERNAME: ${{ vars.PUBLISHER_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PUBLISHER_TOKEN }}
run: |
.venv/bin/python -m twine upload --repository gitea dist/*{.whl,tar.gz}