Skip to content

ci: publish main as next, both binaries and docs - #90

Merged
alukach merged 2 commits into
mainfrom
ci/main-previews
Nov 8, 2026
Merged

alukach merged 2 commits into
mainfrom
ci/main-previews

Conversation

@alukach

@alukach alukach commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

After every merge to main, the team can install that exact commit, as the next release or calling staging, without asking anyone to run Preview build, and can read main's docs before they're released.

# The next release as it stands on main (production defaults)
curl -LsSf https://github.com/source-cooperative/source-coop-cli/releases/download/next/install.sh | sh
# The same commit, calling source.coop's staging environment
curl -LsSf https://github.com/source-cooperative/source-coop-cli/releases/download/next/install.sh | sh -s -- staging
# A manual preview can carry both builds too
gh workflow run "Preview build" -f ref=my-branch -f name=search-ui -f features=both

Main's docs: https://source-cooperative.github.io/source-coop-cli/next/

How it behaves

  • New Main previews workflow: on each push to main it calls Preview build with name: next, features: both. Preview build can now be called from another workflow (workflow_call).
  • features: both builds each target twice and puts both on one pre-release: production as source-coop-NAME, staging as source-coop-NAME-staging. The release notes give both install lines. staging and production work as before.
  • The installer takes an optional argument and installs source-coop-NAME-ARG. With no argument it does what it did before. A name with no build fails with curl's 404.
  • The next pre-release is replaced on each push, like any preview: never "Latest", so Homebrew and the release installers are unaffected. Pushes one after another queue in Preview build's per-name concurrency group, and a queued run is replaced by a newer one.
  • The Docs workflow runs on each push to main and publishes the site, built as version next, to next/. publish.py next adds "next": true to versions.json and leaves latest alone. Releases now keep the other keys in that file, so a release doesn't drop next. The root page still redirects to latest/.
  • The version menu lists next (marked "main") first. Pages under next/ show a banner: "These docs are for main, not yet released. The latest release is vX", with a link to the latest docs.

Docs changes

  • The README's intro mentions next: preview
  • CONTRIBUTING.md's Preview builds section covers features: both, the installer's -s -- staging, and the automatic next preview with its docs.

Not in this PR

  • Pushes to main no longer update the staging pre-release. It's now only for manual runs. The staging build of main is source-coop-next-staging, named so it can't clash with a manual staging preview.
  • next/ is rebuilt on every merge, with no path filter, so it always matches main. Add a filter if those runs ever cost too much.

Testing

  • Both workflow files and docs.yml are valid YAML. actionlint wasn't available locally, so the matrix expression in preview-build.yml (the features axis built with fromJSON) has only been checked by this PR's build-only Preview build run.
  • The installer, run against a fake release on disk: no argument installed source-coop-next, staging installed source-coop-next-staging, and an unknown name failed (exit 37).
  • publish.py, run on a scratch gh-pages directory (release v0.4.0, then next, then v0.5.0): latest ended at v0.5.0, and next/ and "next": true were kept.
  • site.js parses. I haven't looked at the menu or banner in a browser: please check them on this PR's docs preview. A preview only has next once main has published it, so before merging the menu won't list it.
  • Not tried: the push-to-main path for either workflow. It first runs on merge, so check the first Main previews and Docs runs then.

🤖 Generated with Claude Code

Each push to main publishes a `next` pre-release carrying source-coop-next
(production defaults) and source-coop-next-staging, and the docs under
next/, listed in the version menu but never latest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions Bot added a commit that referenced this pull request Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Docs preview: https://source-cooperative.github.io/source-coop-cli/pr-preview/pr-90/

Built from 2a0a25a. It goes live a minute or two after this run, once GitHub Pages deploys it, and is removed when the PR closes.

@claude

claude Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Claude finished @alukach's task in 29s —— View job


I'll analyze this and get back to you.


💰 Estimated review cost: $0.19 · 0m29s · 6 turns

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions Bot added a commit that referenced this pull request Nov 8, 2026
@alukach
alukach merged commit 2866640 into main Nov 8, 2026
18 checks passed
@alukach
alukach deleted the ci/main-previews branch November 8, 2026 20:18
github-actions Bot added a commit that referenced this pull request Nov 8, 2026
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