Skip to content

ci(publish): auto-promote to production after release-triggered staging publish - #72

Merged
xuyushun441-sys merged 2 commits into
mainfrom
ci/auto-promote-production
Jun 22, 2026
Merged

xuyushun441-sys merged 2 commits into
mainfrom
ci/auto-promote-production

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

What

Wire production to auto-promote after a successful, release-triggered staging publish — closing the last manual step in the release flow.

Today: release: published → staging publishes (auto); production is manual dispatch only. This adds a workflow_run trigger to publish-production.yml:

on:
  workflow_dispatch: { ... }          # retained
  workflow_run:
    workflows: ['Publish to marketplace (staging)']
    types: [completed]

The job only runs the auto-promote path when all hold:

  • upstream staging run conclusion == 'success'
  • upstream staging run event == 'release' ← so manual staging dispatches & dry-runs never promote
  • repo is canonical objectstack-ai/templates

Manual workflow_dispatch (template filter + dry-run) is unchanged. The auto path has no inputs → empty filter → publishes all templates (unchanged versions are idempotent 409 no-ops).

Resulting flow

Publish a GitHub Release
   └─▶ staging publish (auto, event=release)
          └─▶ on success ─▶ production publish (auto)   ← NEW

Notes

  • Takes effect once merged to main (GitHub only fires workflow_run from the default branch).
  • So v0.1.0 (already released) won't auto-promote; promote it via a manual production dispatch, or it's covered by the next Release.

🤖 Generated with Claude Code

hotlong and others added 2 commits June 22, 2026 11:47
…ging publish

Production was manual-dispatch only. Add a `workflow_run` trigger so that
when "Publish to marketplace (staging)" completes successfully AND that
staging run was triggered by a GitHub Release (event == 'release'),
production auto-promotes the same versions.

Preserves the staging-first ordering and the existing safety gates:
- manual staging dispatches / dry-runs do NOT promote (not release-triggered)
- canonical-repo guard retained
- manual workflow_dispatch (with template filter + dry-run) retained
- unchanged versions are idempotent 409 no-ops on the control plane

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@xuyushun441-sys
xuyushun441-sys merged commit 6b34e15 into main Jun 22, 2026
3 checks passed
@xuyushun441-sys
xuyushun441-sys deleted the ci/auto-promote-production branch June 22, 2026 05:38
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.

2 participants