Improved Github actions - #169
Conversation
Reviewer's GuideThis PR hardens GitHub Actions by switching dependency management and validation to uv, adding dependency and security guards for restricted pull requests, expanding reusable test/lint/audit coverage, and restructuring publishing into checked, version-validated artifact build and least-privilege release stages. Sequence diagram for checked release publishingsequenceDiagram
participant Release as Release
participant Build as Build job
participant UV as uv checks
participant Artifact as dist artifact
participant PyPI as PyPI
Release->>Build: start build
Build->>UV: run reusable checks
UV-->>Build: checks result
alt checks succeeded
Build->>Build: Verify release tag matches package version
Build->>Artifact: Upload distributions
Artifact->>PyPI: Download distributions
PyPI->>PyPI: Publish package distributions to PyPI
else checks failed or tag mismatches
Build-->>Release: stop publishing
end
Flow diagram for expanded uv validationflowchart TD
Trigger[Push, pull request, schedule, or workflow call] --> Tests[pytest matrix: Python 3.12 to 3.14]
Trigger --> Lint[Locked lint group: Ruff, Ty, Troml]
Trigger --> Audit[uv audit]
Tests --> Aggregate[all-checks]
Lint --> Aggregate
Audit --> Aggregate
Aggregate -->|all jobs succeeded| Valid[Validation passes]
Aggregate -->|any job fails or is cancelled| Invalid[Validation fails]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/publish.yml" line_range="43" />
<code_context>
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
- with:
- skip-existing: true
</code_context>
<issue_to_address>
**issue (bug_risk):** A rerun of a release after any distribution has already been uploaded to PyPI fails because `skip-existing: true` was removed and the publisher now treats already-uploaded files as errors. This prevents recovery from partial or transient publishing failures and also makes successful workflow reruns fail.
**Triggers:** When a release publish is retried after one or more distributions already exist on PyPI.
**Suggested fix:** Restore `skip-existing: true` on the PyPI publish action, or explicitly handle already-existing distributions before publishing.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 1 finding to address first, and the reworked release workflow builds and publishes distributions to PyPI using an OIDC token, so a faulty build or release-gating decision could distribute an incorrect package that reverting the workflow cannot fully retract from consumers. The new dependency-review and lint tooling also changes the repository’s CI and supply-chain controls.
Blocking findings: .github/workflows/publish.yml:43
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Critical publishing bypass and missing dependency-review permissions remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Hardens GitHub Actions CI/CD, dependency checks, security scanning, and guarded PyPI publishing while updating package dependencies and version 1.3.5.
Changes:
- Expands reusable validation, linting, auditing, and required-check reporting.
- Restricts workflow permissions and guards security-report uploads.
- Adds dependency review and updates Dependabot to use uv.
- Separates package building from publishing with release-version validation.
| File | Summary | Findings |
|---|---|---|
uv.lock |
Locks updated package and lint dependencies. | None |
pyproject.toml |
Bumps version and adds lint dependencies. | None |
.github/workflows/zizmor.yml |
Guards security-report uploads. | None |
.github/workflows/uv.yml |
Expands CI validation and reusable workflow support. | None |
.github/workflows/publish.yml |
Separates builds from publishing and validates versions. | Critical issue (2 votes): manual dispatch can bypass release-tag validation. |
.github/workflows/dependency-review.yml |
Adds dependency vulnerability checks. | Moderate issue (1 vote): missing pull-requests: read permission may prevent review API access. |
.github/workflows/codeql-analysis.yml |
Guards security uploads for restricted pull requests. | None |
.github/dependabot.yml |
Switches dependency updates to uv. | None |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Improvements and guards for GitHub actions.
Summary by Sourcery
Harden GitHub Actions with broader validation, safer permissions, dependency review, and gated package publishing.
New Features:
Bug Fixes:
Enhancements:
Build: