github actions to publish to Pypi - #4
Conversation
…n permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions release workflow to build and publish tagged releases to PyPI, and updates packaging configuration to build with uv_build instead of hatchling, alongside minor project metadata tweaks.
Changes:
- Added
.github/workflows/distribute.ymlto test, build, and publish distributions onv*tags. - Updated
pyproject.tomlbuild backend touv_buildand adjusted project metadata (authors/keywords), plus added abuildextra.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
pyproject.toml |
Switches build backend to uv_build, updates author metadata/keywords, and adds a build-related extra. |
.github/workflows/distribute.yml |
Introduces a tag-triggered pipeline to run lint/tests, build artifacts, and publish to PyPI via OIDC. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| run: uv python install ${{ matrix.python-version }} | ||
|
|
||
| - name: Install dependencies | ||
| run: uv sync --all-extras |
There was a problem hiding this comment.
Using uv sync --all-extras will install docs/build extras too, which can significantly slow down the release test job and increase the chance of unrelated dependency breakage. Consider syncing only what the test job needs (e.g., --extra dev) or a dedicated test group/extra.
| run: uv sync --all-extras | |
| run: uv sync --extra dev |
reuse github workflow in ci test Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@hotung1027 I've opened a new pull request, #5, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: hotung1027 <20833241+hotung1027@users.noreply.github.com>
[WIP] Update GitHub Actions for PyPI publishing Update author formatting in pyproject.toml
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
drop pr write permission Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
pyproject.toml:53
- The PR description mentions adding a "build dependency group", but the change adds
buildunder[project.optional-dependencies], which creates an installable extra (pip install .[build]) rather than a dependency group. If the intent is a dependency group foruv/PEP 735-style grouping, this likely needs to be expressed using the project’s supported grouping mechanism instead of optional-dependencies (or the PR description should be updated to match what’s actually implemented).
[project.urls]
Homepage = "https://github.com/hotung1027/anyiostream"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| test: | ||
| uses: ./.github/workflows/ci.yml | ||
| secrets: inherit | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| needs: test |
There was a problem hiding this comment.
test job is calling uses: ./.github/workflows/ci.yml, but .github/workflows/ci.yml is not a reusable workflow (it lacks on: workflow_call). As written, this workflow will fail at runtime. Either add workflow_call to ci.yml (and adjust inputs/outputs as needed), or duplicate the CI steps directly in this workflow (or reference a reusable workflow that already supports workflow_call).
| test: | |
| uses: ./.github/workflows/ci.yml | |
| secrets: inherit | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| build: | |
| runs-on: ubuntu-latest |
| [tool.uv_build] | ||
| packages = ["src/anyiostream"] |
There was a problem hiding this comment.
[build-system].requires uses a different requirement-string format ("uv_build >= 0.10.0, <0.11.0") than the rest of the file (e.g. anyio>=4.8.0, uv_build>=0.10.0,<0.11.0). Consider normalizing this to the same no-space specifier style to reduce churn and avoid subtle parsing differences across tooling.
hotung1027
left a comment
There was a problem hiding this comment.
all CodeQL, security,and format has fixed
This pull request introduces a new workflow for distributing the package to PyPI and updates the project configuration to use
uv_buildfor builds instead ofhatchling. It also revises author information and project metadata inpyproject.toml. These changes modernize the build and distribution process and ensure compatibility with recent Python versions.Build and Distribution Workflow Updates
.github/workflows/distribute.ymlto automate testing, building, and publishing to PyPI using GitHub Actions, with matrix testing for Python 3.12 and 3.13, and theuvtool for dependency management and builds.Project Configuration and Metadata Changes
hatchlingtouv_buildinpyproject.toml, including updating the[build-system]section and adding abuilddependency group.pyproject.tomlto include name and email, replacing the previous format.backpressurekeyword from thekeywordslist inpyproject.tomlfor improved metadata accuracy.