Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/test-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Test Upload Python Package to Test PyPI

"on":
push:
branches: [main]

jobs:
publish:
runs-on: ubuntu-latest
environment: testing
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: "pyproject.toml"
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
activate-environment: "true"
- name: Install dependencies
run: |
uv sync --all-extras --dev
- name: Build
run: python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
- repo: builtin
hooks:
- id: check-added-large-files
- id: check-merge-conflict
Expand Down
9 changes: 3 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ keywords = [
"prometheus",
"homekit",
]
license = { file = "LICENSE" }
license = "MIT"
license-files = ["LICENSE"]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 3 - Alpha",
]
dependencies = ["prometheus_client", "environs"]
dynamic = ["version"]

[project.urls]
repository = "https://github.com/jerr0328/co2-mini"
repository = "https://github.com/jerr0328/co2mini"

[project.optional-dependencies]
homekit = ["hap-python"]
Expand Down Expand Up @@ -66,9 +66,6 @@ extend-select = [
"W", # pycodestyle warnings
]

[tool.isort]
profile = "black"

[tool.setuptools_scm]

[dependency-groups]
Expand Down
3 changes: 0 additions & 3 deletions setup.py

This file was deleted.