5109b6505c
Convert both pyproject.toml files to the uv_build backend and turn the repo into a proper uv workspace (plotstyle moved to src layout, since uv_build requires the module in its own subdirectory). Dev tooling moves from an optional-dependencies extra to a dependency-group, and plotstyle's matplotlib dependency is now its own rather than a gallery "plotting" extra. Gitea Actions workflows and the Dockerfile now use astral-sh/setup-uv, uv sync, uv run, uv build, and uv publish throughout instead of pip, build, and twine. Also fixes .dockerignore, which was excluding uv.lock, deploy/, and README.md and would have broken even the previous Dockerfile's COPY of deploy/entrypoint.sh. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Publish plotstyle
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "plotstyle-v*"
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
jobs:
|
|
publish:
|
|
name: build-and-publish
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: astral-sh/setup-uv@v9.0.0
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Verify tag matches package version
|
|
run: |
|
|
tag_version="${GITHUB_REF_NAME#plotstyle-v}"
|
|
pkg_version="$(uv version --short --package plotstyle)"
|
|
if [ "$tag_version" != "$pkg_version" ]; then
|
|
echo "Tag plotstyle-v$tag_version does not match pyproject.toml version $pkg_version" >&2
|
|
exit 1
|
|
fi
|
|
|
|
- name: Build wheel and sdist
|
|
run: uv build --package plotstyle -o dist
|
|
|
|
- name: Publish to Gitea package registry
|
|
env:
|
|
UV_PUBLISH_USERNAME: ${{ github.actor }}
|
|
UV_PUBLISH_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|
|
run: uv publish --publish-url "${{ github.server_url }}/api/packages/${{ github.repository_owner }}/pypi" dist/*
|