Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 2.46 KB

File metadata and controls

37 lines (24 loc) · 2.46 KB

Releasing setup-primitive

Authored in primitivedotdev/primitive-mono-repo under tools/actions/setup-primitive/ and mirrored on tag to the public repo primitivedotdev/setup-primitive. Consumers pin a floating major (@v0) or an immutable patch (@v0.1.0).

The mirror is one-way: each release force-replaces the public tree with tools/actions/setup-primitive/. No PRs against the public repo.

Same model as deploy-function. This is a composite action — there is no dist//ncc build, so no check-dist step; the published tree is action.yml + docs verbatim.

One-time setup

Publishing is handled by the generalized mirror-action.yml workflow (shared by every action under tools/actions/) — there's no per-action mirror workflow to add. The workflow is a thin tag-triggered caller: it does only auth setup (OIDC + the App installation token) and delegates the mirror to the typed, unit-tested deploy-engine (deploy-worker mirror-action). On first publish it creates primitivedotdev/setup-primitive automatically if it doesn't exist (it needs the primitive-ci App to have org Administration: write; if not, it prints a gh repo create … to run once by hand). The org-level App install (repository_selection: all) covers the new repo — no per-repo install or GitHub Actions secret to manage.

This is a composite action (no dist/ bundle), so the actions CI job has nothing to build-check here — it runs typecheck/test:run/lint:dist only for the ncc actions and skips this one.

Cutting a release

git checkout main && git pull --ff-only
git tag setup-primitive-action-v0.1.0
git push origin setup-primitive-action-v0.1.0

The mirror workflow asserts the tag commit is reachable from origin/main, force-replaces the public tree, and moves the floating major (v0) to the new patch. Verify:

gh api repos/primitivedotdev/setup-primitive/tags --jq '.[].name'
curl -fsSL https://raw.githubusercontent.com/primitivedotdev/setup-primitive/v0/action.yml | head -20

Rollback

Tag the previous good commit with a superseding patch (never delete a published tag — consumers may already pin it):

git tag setup-primitive-action-v0.1.1 <previous-good-sha>
git push origin setup-primitive-action-v0.1.1