Skip to content

chore: automate security updates and releases#28

Merged
NiklasRosenstein merged 1 commit intodevelopfrom
automate-maintenance
Mar 15, 2026
Merged

chore: automate security updates and releases#28
NiklasRosenstein merged 1 commit intodevelopfrom
automate-maintenance

Conversation

@NiklasRosenstein
Copy link
Copy Markdown
Owner

Summary

This PR wires up fully-automatic maintenance for the repo so that open security PRs merge themselves and a new PyPI release follows automatically.

1. renovate.json — automerge for Renovate PRs

2. pyproject.toml — loosen overly tight dependency pins

The previous constraints had patch-level upper bounds that directly blocked the open Renovate PRs:

Dep Before After
cryptography >=44.0.0,<44.0.1 >=44.0.0
urllib3 >=2.6.3,<2.6.4 >=2.6.3

PyJWT<3.0.0 and requests<3.0.0 are intentional major-version guards and are left as-is.

3. .github/workflows/auto-release.yml — automatic version tagging

After the existing Python CI workflow passes on develop, this workflow:

Path A — unreleased commits exist (e.g. after Renovate PRs merge):

  1. Auto-bumps the patch version in pyproject.toml and __init__.py
  2. Generates a .changelog/<new_version>.toml entry summarising the merged commits
  3. Pushes the commit + tag → triggers release.yml → publishes to PyPI

Path B — version was manually bumped in a PR:

  1. Checks that a .changelog/<version>.toml entry exists
  2. If so, tags the version → triggers release.yml

Note: The auto-release commit is pushed with a RELEASE_TOKEN secret (falls back to GITHUB_TOKEN). For the tag push to trigger release.yml, a PAT stored as RELEASE_TOKEN is needed (pushes via GITHUB_TOKEN do not trigger further workflows). If you don't have one set up, you can add a fine-grained PAT with contents: write scope.

Test plan

  • Merge this PR
  • Verify Renovate re-evaluates the open security PRs and enables auto-merge on them
  • Confirm that once a security PR merges and CI passes, auto-release.yml runs and a new patch tag appears
  • Confirm release.yml picks up the tag and publishes to PyPI

- renovate.json: enable platformAutomerge + automerge for security
  updates immediately and minor/patch after 3-day stabilisation period
- pyproject.toml: remove overly tight patch-level upper bounds on
  cryptography and urllib3 so Renovate security PRs can actually merge
- .github/workflows/auto-release.yml: after CI passes on develop,
  either tag a manually-bumped version (if changelog entry exists) or
  auto-bump the patch version, generate a changelog entry, and push
  the tag — which triggers the existing release.yml to publish to PyPI

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@NiklasRosenstein NiklasRosenstein merged commit 7fafbc1 into develop Mar 15, 2026
5 checks passed
@NiklasRosenstein NiklasRosenstein deleted the automate-maintenance branch March 15, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant