Skip to content

ci: introduce release-please automated release pipeline#44

Merged
gerchowl merged 1 commit intomainfrom
chore/release-please-pipeline
Apr 18, 2026
Merged

ci: introduce release-please automated release pipeline#44
gerchowl merged 1 commit intomainfrom
chore/release-please-pipeline

Conversation

@gerchowl
Copy link
Copy Markdown
Contributor

Description

Introduce the release-please automated release pipeline for both Python (py-materials → PyPI) and Rust (rs-materials → crates.io, gated) packages. Adds PR hygiene enforcement, restructures the PR template for "delete-if-not-applicable" semantics, and defers rs-materials crates.io publishing via a repo-var gate pending downstream coordination.

Type of Change

  • ci / build — CI/CD pipeline changes (no release)

Required

  • Tests pass locally (uv run pytest — 241 passed, 18 skipped earlier this session; this PR touches only CI/workflow/template files, no Python code)
  • Self-reviewed the diff
  • No new warnings or errors in the changed code
  • Linked to an issue in the Refs: line at the bottom

If Applicable

Documentation

  • Updated RELEASE_PROCESS.md to describe the new flow (replaces the manual git tag / git push instructions)
  • Release-reviewer checklist embedded in release-please's pull-request-header so every auto-generated Release PR carries explicit merge gates

Additional Notes

Failure modes now gated out:

  • Wrong/forgotten version bump → impossible (release-please owns pyproject.toml, src/pymat/__init__.py, mat-rs/Cargo.toml version fields)
  • Forgotten CHANGELOG entry → impossible (generated from commits, visible in Release PR diff before merge)
  • Stupid tag (v9.9.9 typed by hand) → impossible (versions derived from commit history)
  • Tag without publish → impossible (uses RELEASE_APP token, not GITHUB_TOKEN, so tag pushes trigger downstream workflows)
  • Release without human review → impossible (Release PR must be merged by a human)
  • Unchecked PR template items → impossible (pr-hygiene CI check)

What must follow this PR landing on main:

  1. Ruleset update. Add PR Hygiene to required-status-checks on both main-protection (ruleset 15092073) and dev-protection (ruleset 15092074). I'll do this via gh api automatically once this PR merges.
  2. Verify RELEASE_APP permissions — needs contents: write + pull-requests: write. Likely already granted since the App handles auto-merge in sync-main-to-dev.yml, but worth checking in the App settings.

Related issues:

Refs: #43

Drives version bumps, tagging, and publish triggers from conventional
commits for both Python (py-materials → PyPI) and Rust (rs-materials →
crates.io, gated) packages.

Pipeline on push to main:
1. release-please scans commits since the last tag and opens a
   per-package Release PR bumping versions + appending CHANGELOG
   entries.
2. Merging the Release PR pushes a tag (vX.Y.Z or
   rs-materials/vX.Y.Z), which triggers the existing publish
   workflows.
3. release-please creates the GitHub Release with auto-generated
   notes — the duplicate `github-release` jobs in release.yml and
   release-rs-materials.yml are removed.

Also:
- PR Hygiene job enforces the contributor PR template checklist via
  mheap/require-checklist-action. Template restructured into
  "required" (must be checked) and "if applicable" (delete sections
  that don't apply) groups. Bot PRs from release-please are exempt
  (they carry their own release-reviewer checklist for humans).
- rs-materials crates.io publishing is gated behind
  vars.CRATES_IO_PUBLISH_ENABLED until the token is configured and
  downstream consumer coordination completes (issue #43).
- Uses the existing RELEASE_APP GitHub App so the tag release-please
  pushes triggers downstream workflows (GITHUB_TOKEN pushes are inert
  under recursion protection).

Refs: #43
@gerchowl gerchowl enabled auto-merge (squash) April 18, 2026 16:24
@gerchowl gerchowl merged commit c164be0 into main Apr 18, 2026
16 checks passed
gerchowl added a commit that referenced this pull request Apr 18, 2026
Two fixes to the release-please pipeline that only surfaced on the first
live run against main (#44):

1. `extra-files` type `python` is not a valid release-please type —
   supported types are `json`, `yaml`, `toml`, `xml`, and `generic`.
   Switched to `generic` and annotated the `__version__` line in
   `src/pymat/__init__.py` with the `x-release-please-version` marker
   so release-please can rewrite it on version bumps.

2. Manifest baseline for `py-materials` was set to 3.0.0 (the pending
   vis-cutover version on feature/40-vis-cutover), but the current
   released state on main is 2.1.0. Corrected to `.: "2.1.0"` so
   release-please computes the next version from the actual main
   history rather than leapfrogging. rs-materials at 0.2.0 is already
   correct.

The "commit could not be parsed" noise in the first run is from
legacy merge-commit subjects and pre-convention release commits —
those are warnings, not fatal, and release-please ignores them when
computing the next version.

Refs: #43
gerchowl added a commit that referenced this pull request Apr 18, 2026
…#46)

Two fixes to the release-please pipeline that only surfaced on the first
live run against main (#44):

1. `extra-files` type `python` is not a valid release-please type —
   supported types are `json`, `yaml`, `toml`, `xml`, and `generic`.
   Switched to `generic` and annotated the `__version__` line in
   `src/pymat/__init__.py` with the `x-release-please-version` marker
   so release-please can rewrite it on version bumps.

2. Manifest baseline for `py-materials` was set to 3.0.0 (the pending
   vis-cutover version on feature/40-vis-cutover), but the current
   released state on main is 2.1.0. Corrected to `.: "2.1.0"` so
   release-please computes the next version from the actual main
   history rather than leapfrogging. rs-materials at 0.2.0 is already
   correct.

The "commit could not be parsed" noise in the first run is from
legacy merge-commit subjects and pre-convention release commits —
those are warnings, not fatal, and release-please ignores them when
computing the next version.

Refs: #43
gerchowl added a commit that referenced this pull request Apr 18, 2026
Brings in the release-please automated release pipeline (#44), the
pipeline self-fix (#46), and the 2.1.1 CI-infrastructure patch
release (#48) onto the vis cutover branch so 3.0 ships through the
new flow.

Conflict resolutions:
- pyproject.toml: kept `version = "3.0.0"` over main's 2.1.1
- src/pymat/__init__.py: kept 3.0.0 + kept main's
  `# x-release-please-version` marker comment
- CHANGELOG.md: renamed the pre-written `[3.0.0]` section to
  `Unreleased` (release-please will version it on Release PR),
  folded main's 2.1.1 entry in below, added mat-vis-client>=0.4.0
  bump + cache-clear note to the Breaking list

Refs: #40
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