DRAFT: reusable pypi-publish + release model (org release automation)#16
Draft
ywatanabe1989 wants to merge 1 commit into
Draft
DRAFT: reusable pypi-publish + release model (org release automation)#16ywatanabe1989 wants to merge 1 commit into
ywatanabe1989 wants to merge 1 commit into
Conversation
Add the missing org-level release automation as two reusable workflows plus the release-model doc. DRAFT — not adopted by any leaf repo. - reusable B: pypi-publish-and-github-release-on-tag.yml (workflow_call) build + CONTAINMENT-GUARD + publish + GitHub Release, parametrized hosted|sif via `publish-backend`. The guard asserts the tag commit is an ancestor of origin/main (git merge-base --is-ancestor) and aborts RED otherwise — makes the silent squash-merge failure loud. - reusable A: promote-develop-to-main-on-tag.yml (workflow_call) CI on the tagged commit (org pytest-matrix), then auto-open + auto-merge develop->main with a MERGE commit (never squash). Chained from B via the caller's `needs: promote`. - workflow-templates/release.yml (+ .properties.json): the thin 2-job caller a leaf repo copies. - RELEASE-MODEL.md: flow, guard, actor-feedback loop, adoption steps, a worked scitex-dev (SIF) example, and the human-decision list. Validated: yaml.safe_load parses all four; actionlint 1.7.1 clean on both reusables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DRAFT proposal — org-level release automation (do NOT merge)
This is a draft for review, not a change to land this run. It adds the
missing org release automation that 68 repos currently inline (and drift) —
there is today no
pypi-publishreusable in scitex-ai/.github at all, sothose copies cannot be delegated. This PR creates that reusable and implements
the operator-confirmed release model (TG 2026-07-23).
What's here
.github/workflows/pypi-publish-and-github-release-on-tag.yml(
on: workflow_call): build -> containment guard -> publish -> GitHubRelease, parametrized hosted | sif via the
publish-backendinput..github/workflows/promote-develop-to-main-on-tag.yml(
on: workflow_call): CI on the tagged commit (orgpytest-matrix), thenauto-open + auto-merge
develop->mainwith a MERGE commit (never squash).workflow-templates/release.yml(+.properties.json):the 2-job file a leaf repo copies.
RELEASE-MODEL.md— flow diagram, guard, feedback loop, adoption steps,a worked scitex-dev (SIF) example, and the human-decision list.
The two publish backends (one input selects the path)
runs-on-json)hosted'"ubuntu-latest"'python -m buildpypa/gh-action-pypi-publish(Docker, OIDC trusted publisher)sif'["self-hosted","Linux","X64","scitex-ci"]'.github/ci/build-in-sif.sh.github/ci/publish-in-sif.sh(manual OIDC inside the SIF — no Docker/Python on the bare Spartan node)A
sifrepo must never receive a hostedruns-on-json— respects theno-hosted-runners-guardposture. Learned from the two real inlined variants(scitex-io = hosted, scitex-dev/scitex-plt = sif).
The containment guard (loud-fail, works under squash OR ff)
A squash merge silently mints a new SHA and drops the tag's commit from main's
history; the guard turns that into a red abort at publish time instead of a
mis-versioned release. Reusable A also merges
--merge(never--squash) andre-checks containment right after merging (belt + braces).
Actor feedback (A->B => B->A)
Each job writes a
repo + stage + tag + verdictline to$GITHUB_STEP_SUMMARY; B's finalreportjob emits a consolidated verdict andfails red on any stage failure, so
github.actor's run-failurenotification names the repo + stage.
# FLEET-HOOK:markers show exactly wherea scitex-todo card / DM to the actor plugs in later.
Decisions-for-review (defensible defaults, implemented)
secret is required; B declares one optional
PYPI_API_TOKENas thedocumented fallback for token-based repos.
after it with a single
needs: promoteedge — both must be sibling jobs inone caller workflow for
needsto gate B on A.runs-on-jsonviafromJSONunifies the array (self-hosted) and barestring (
"ubuntu-latest") cases in one field.Human decisions still needed
real release — the single biggest gate.
pytest-matrixreusable (
uses:can't be an expression); hosted-only repos need a hosted CIvariant or a
runs-oninput onpytest-matrix.yml.--adminmerge with a merge commit must be permitted by each repo'sbranch protection (squash-only would trip the guard).
(docs/DOI/extra gates) — each extra must become a B input or a caller
companion job; enumerate + decide per repo.
Validation
yaml.safe_loadparses all 4 YAML/JSON files.actionlint 1.7.1— clean (exit 0, no findings) on both reusables.DRAFT. Not merged, not marked ready, not deployed to any leaf repo.