diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a7c86ca..57ffae2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,8 +10,12 @@ on: - "v[0-9]+.[0-9]+.[0-9]+" jobs: - test: + run: runs-on: ubuntu-latest + environment: pypi + permissions: + id-token: write + contents: read steps: - name: Checkout source code uses: actions/checkout@v6 @@ -21,7 +25,6 @@ jobs: with: version: "latest" python-version: "3.11" - enable-cache: true - name: Install dependencies run: uv sync --dev @@ -29,40 +32,8 @@ jobs: - name: Run tests run: uv run pytest - build: - needs: [test] - runs-on: ubuntu-latest - steps: - - name: Checkout source code - uses: actions/checkout@v6 - - - name: Set up uv and Python - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 - with: - version: "latest" - python-version: "3.11" - - name: Build distribution run: uv build - - name: Upload distribution artifacts - uses: actions/upload-artifact@v4 - with: - name: dist - path: dist/ - - publish-to-pypi: - needs: [build] - runs-on: ubuntu-latest - environment: pypi - permissions: - id-token: write # required for OIDC trusted publishing - steps: - - name: Download distribution artifacts - uses: actions/download-artifact@v4 - with: - name: dist - path: dist/ - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + run: uv publish diff --git a/pyproject.toml b/pyproject.toml index 9a6ba96..e40963c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,12 @@ [project] name = "openscad-packer" -version = "2026.6.2" +dynamic = ["version"] description = "Pack OpenSCAD includes into an efficient single file." readme = "README.md" license = "AGPL-3.0-or-later" requires-python = ">=3.11" -authors = [{name = "Torgny Bjers"}] +authors = [{name = "Torgny Bjers", email = "torgny.bjers@gmail.com"}] +license-files = ["LICENSE"] keywords = [ "openscad", "packer", @@ -16,6 +17,7 @@ classifiers = [ "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", "Intended Audience :: Developers", + "Development Status :: 5 - Production/Stable", "Operating System :: OS Independent", "Programming Language :: Python :: 3", @@ -50,5 +52,8 @@ exclude_lines = [ ] [build-system] -requires = ["hatchling"] +requires = ["hatchling", "hatch-vcs"] build-backend = "hatchling.build" + +[tool.hatch.version] +source = "vcs"