Skip to content

ci: split marketplace publish into explicit staging + production workflows#20

Merged
xuyushun441-sys merged 2 commits into
mainfrom
chore/split-publish-workflows-staging-prod
Jun 4, 2026
Merged

ci: split marketplace publish into explicit staging + production workflows#20
xuyushun441-sys merged 2 commits into
mainfrom
chore/split-publish-workflows-staging-prod

Conversation

@xuyushun441-sys
Copy link
Copy Markdown
Contributor

@xuyushun441-sys xuyushun441-sys commented Jun 4, 2026

Replaces the single publish.yml (ambiguous vars.OS_CLOUD_URL) with two explicit, hard-coded-target workflows using distinct org-level secrets — no GitHub Environments, no per-repo setup.

Workflow Target (hard-coded) Secret Triggers
publish-staging.yml https://cloud.objectos.app OS_CLOUD_API_KEY_STAGING dispatch + release (auto)
publish-production.yml https://cloud.objectos.ai OS_CLOUD_API_KEY_PRODUCTION dispatch only (manual promote)

Both reuse scripts/publish-template.mjs. Target URL + credential are fully separated per environment, so a staging dispatch can never carry the prod key or hit the prod cloud.

Setup — one-time, ORG level (Settings → Secrets and variables → Actions)

Add two organization secrets (shared by all repos, no per-repo config):

  • OS_CLOUD_API_KEY_STAGING
  • OS_CLOUD_API_KEY_PRODUCTION

Flow

Cut a release (or dispatch staging) → auto-publishes to staging → verify on cloud.objectos.app → dispatch production to promote.

Pairs with #19 (template version bumps for the 7.7.0 republish).

os-zhuang and others added 2 commits June 4, 2026 14:33
…flows

Replaces the single publish.yml (which used an ambiguous `vars.OS_CLOUD_URL`,
so a dispatch could silently target the wrong cloud) with two explicit,
hard-coded-target workflows:

  - publish-staging.yml    → https://cloud.objectos.app  (environment: staging)
      Triggers: workflow_dispatch + release published (auto-publish to staging).
  - publish-production.yml → https://cloud.objectos.ai   (environment: production)
      MANUAL ONLY (workflow_dispatch). No release/push trigger — production is a
      deliberate promotion. Use the `production` GitHub Environment's required-
      reviewers protection to gate it.

Both reuse scripts/publish-template.mjs and resolve OS_CLOUD_API_KEY from their
GitHub Environment (falls back to a repo-level secret of the same name). Removing
the shared var eliminates the staging/prod target ambiguity.

Setup note: create `staging` + `production` GitHub Environments in repo settings,
each with an OS_CLOUD_API_KEY secret (+ required reviewers on production).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ents

Simpler ops: drop the `environment:` scoping (which needs per-repo Environment
setup) in favour of two distinctly-named secrets settable ONCE at the org level:

  - staging    → OS_CLOUD_API_KEY_STAGING
  - production → OS_CLOUD_API_KEY_PRODUCTION

URLs stay hard-coded (staging=cloud.objectos.app, prod=cloud.objectos.ai), so
target + credential are both fully separated and a staging dispatch can never
carry the prod key. Production remains manual-dispatch-only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@xuyushun441-sys xuyushun441-sys merged commit 0d58147 into main Jun 4, 2026
3 checks passed
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