Same slip as triggershell's equivalent fix: git mv reuses the already- indexed blob for the source path rather than re-hashing the working tree, so it silently ignores unstaged edits made before the rename. The previous commit renamed release.yaml to ci.yml but carried over the old single-job content underneath it. This is the content that commit was supposed to carry.
55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
checks:
|
|
name: Checks
|
|
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
|
|
|
|
publish:
|
|
name: Publish to PyPI registry
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
needs: checks
|
|
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: 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 }}
|