Files
openrgb-hue/.gitea/workflows/ci.yml
T
valknar eba9c04e02 ci: run checks on every push, publish only on tag
Same split as pulsenode's workflow: previously this only ran at all
when pushing a version tag, so ruff/pytest never ran on regular
commits or PRs - a broken push could sit unnoticed until someone tried
to cut a release. Now checks run on every push and PR; publish to the
PyPI registry stays gated to a tag push and requires checks to pass
first. Renamed release.yaml -> ci.yml to match.
2026-08-17 17:39:06 +02:00

40 lines
958 B
YAML

name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: https://github.com/actions/checkout@v4
- uses: https://github.com/actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build dependencies
run: pip install ".[dev]" build twine
- name: Lint
run: ruff check .
- name: Format check
run: ruff format --check .
- run: pytest
- name: Set package version from the tag
run: sed -i "s/^__version__ = .*/__version__ = \"${GITHUB_REF_NAME#v}\"/" src/openrgb_hue/__init__.py
- name: Build sdist and wheel
run: python -m build
- name: Publish to Gitea PyPI registry
run: twine upload --repository-url https://dev.pivoine.art/api/packages/valknar/pypi dist/*
env:
TWINE_USERNAME: valknar
TWINE_PASSWORD: ${{ secrets.PACKAGE_TOKEN }}