From 269c08a5a1ef2071590dd377c78f01cbccd261b2 Mon Sep 17 00:00:00 2001 From: claude-ceo-assistant Date: Sun, 10 May 2026 17:59:25 -0700 Subject: [PATCH] feat(ci): restore staging+main path-filter trigger on publish-runtime (closes #348 Q1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds back the original GitHub workflow's auto-publish trigger that was dropped during the 2026-05-10 .gitea port (#206). Push to main or staging filtered by workspace/** falls into the existing PyPI-latest auto-bump path — no logic changes, just the missing trigger and a comment correction. Caveat: the workflow still requires PYPI_TOKEN as a repository secret (or org-level). Without it the publish step will fail loudly with a descriptive error. Q2 follow-up tracks setting the secret. Refs: molecule-core#348 --- .gitea/workflows/publish-runtime.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/publish-runtime.yml b/.gitea/workflows/publish-runtime.yml index 36c861e8..a414c303 100644 --- a/.gitea/workflows/publish-runtime.yml +++ b/.gitea/workflows/publish-runtime.yml @@ -12,7 +12,12 @@ name: publish-runtime # - Replaced `github.ref_name` (GitHub-only) with `${GITHUB_REF#refs/tags/}` # — Gitea Actions exposes github.ref (the full ref) but not ref_name # - Dropped `merge_group` trigger (Gitea has no merge queue) -# - Dropped `staging` branch trigger (no staging branch exists in this repo) +# +# 2026-05-10 (issue #348): restored `staging`/`main` branch + `workspace/**` +# path-filter trigger and the PyPI-latest auto-bump path that consumes it. +# The 2026-05-10 inline comment "no staging branch exists in this repo" was +# inherited verbatim from the runtime-mirror port and is INCORRECT for +# molecule-core. hongming-pc is blocked on this trigger. # # PyPI publishing: requires PYPI_TOKEN repository secret (or org-level secret). # Set via: repo Settings → Actions → Variables and Secrets → New Secret. @@ -23,6 +28,11 @@ name: publish-runtime on: push: + branches: + - main + - staging + paths: + - "workspace/**" tags: - "runtime-v*" workflow_dispatch: @@ -65,10 +75,9 @@ jobs: VERSION="${GITHUB_REF#refs/tags/runtime-v}" else # Fallback: derive from PyPI latest + patch bump. - # (The staging-push auto-bump trigger is dropped on Gitea — - # no staging branch exists. This fallback path is kept for - # robustness if a future automation uses workflow_dispatch without - # an explicit version input.) + # Used by the restored `push.branches: [main, staging]` + + # `paths: workspace/**` auto-bump trigger (issue #348). Also kept + # for workflow_dispatch invocations that omit the version input. LATEST=$(curl -fsS --retry 3 https://pypi.org/pypi/molecule-ai-workspace-runtime/json \ | python -c "import sys,json; print(json.load(sys.stdin)['info']['version'])") MAJOR=$(echo "$LATEST" | cut -d. -f1)