diff --git a/.github/workflows/publish-testpypi.yml b/.github/workflows/publish-testpypi.yml new file mode 100644 index 0000000..6bd206d --- /dev/null +++ b/.github/workflows/publish-testpypi.yml @@ -0,0 +1,53 @@ +name: Publish to TestPyPI + +on: + workflow_dispatch: + +permissions: + id-token: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install build tools + run: pip install build + + - name: Build package + run: python -m build + + - name: Verify package metadata + run: | + pip install check-wheel-contents + check-wheel-contents dist/*.whl + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ + + publish-testpypi: + needs: build + runs-on: ubuntu-latest + environment: testpypi + permissions: + id-token: write + steps: + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - name: Publish to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c41001a..43dbd9b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,15 +24,44 @@ jobs: - name: Build package run: python -m build + - name: Verify package metadata + run: | + pip install check-wheel-contents + check-wheel-contents dist/*.whl + - name: Upload build artifacts uses: actions/upload-artifact@v4 with: name: dist path: dist/ - publish: + test-install: needs: build runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.12", "3.13"] + steps: + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - name: Install from wheel + run: pip install dist/*.whl + + - name: Verify import + run: python -c "from lansweeper_helpdesk import HelpdeskAPI, __version__; print(f'lansweeper-helpdesk v{__version__} installed successfully')" + + publish: + needs: [build, test-install] + runs-on: ubuntu-latest environment: pypi permissions: id-token: write diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e54cd2..ee53ec1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/). -## [0.1.0] - Unreleased +## [0.1.0] - 2026-03-05 Initial release as a proper Python package. diff --git a/pyproject.toml b/pyproject.toml index 247acff..b418678 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,23 +5,27 @@ build-backend = "hatchling.build" [project] name = "lansweeper-helpdesk" dynamic = ["version"] -description = "Python SDK for the Lansweeper Helpdesk API" +description = "Python SDK for the Lansweeper Helpdesk API — create, search, and manage helpdesk tickets programmatically." readme = "README.md" -license = "MIT" +license = {text = "MIT"} requires-python = ">=3.10" authors = [ { name = "Daniel Brandao" }, ] -keywords = ["lansweeper", "helpdesk", "api", "sdk", "itsm"] +keywords = ["lansweeper", "helpdesk", "api", "sdk", "itsm", "ticketing", "it-service-management"] classifiers = [ - "Development Status :: 3 - Alpha", + "Development Status :: 4 - Beta", "Intended Audience :: Developers", + "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: System :: Systems Administration", "Typing :: Typed", ] dependencies = [ @@ -31,6 +35,7 @@ dependencies = [ [project.urls] Homepage = "https://github.com/ds-brandao/Lansweeper.Helpdesk-Python" +Documentation = "https://github.com/ds-brandao/Lansweeper.Helpdesk-Python#readme" Repository = "https://github.com/ds-brandao/Lansweeper.Helpdesk-Python" Issues = "https://github.com/ds-brandao/Lansweeper.Helpdesk-Python/issues" Changelog = "https://github.com/ds-brandao/Lansweeper.Helpdesk-Python/blob/main/CHANGELOG.md" @@ -44,6 +49,7 @@ dev = [ "mypy>=1.10", "types-requests>=2.31", "types-beautifulsoup4>=4.12", + "build>=1.0", ] [tool.hatch.version] @@ -52,6 +58,16 @@ path = "src/lansweeper_helpdesk/__init__.py" [tool.hatch.build.targets.wheel] packages = ["src/lansweeper_helpdesk"] +[tool.hatch.build.targets.sdist] +include = [ + "src/", + "tests/", + "LICENSE", + "README.md", + "CHANGELOG.md", + "pyproject.toml", +] + [tool.ruff] target-version = "py310" line-length = 120