Release on green
@slashclone/release-on-green
Set up a release pipeline with no manual gates: when CI passes on main, migrate the database, deploy, run a smoke test, and roll back on its own if the smoke test fails. Writes the GitHub Actions workflow for you to review; never deploys or stores secrets itself.
SkillDevOpsv0.1.0 (latest)
- Activity
- New: be the first to try it
- Installs
- 0 installs
- Likes
- 0 likes
- Clones
- 0 clones
How this works
- It is a skill: written instructions Claude reads when your request matches what the skill is for. You do not call it by name; just ask for the task.
- While it works, it reads and changes files in the places it lists, nowhere else.
- Nothing runs until you choose to use it, and you can remove it any time.
SKILL.md
Release on green
Goal: every commit that passes CI on the main branch ships to production on its own, and a bad deploy undoes itself. People only step in when something fails.
The pipeline
- Trigger:
workflow_runon the CI workflow, only when it concludedsuccess, only for the main branch. Never on pull requests. - Concurrency: one release at a time,
cancel-in-progress: false, so a migration is never cut off. Let CI cancel older runs instead, so the newest release includes everything. - Record what is live before changing anything (the current deployment id or image), so rollback has a target.
- Migrate the database with the project's own migration command. Migrations must be backwards compatible with the code that is still live (add columns before using them; drop them a release later).
- Deploy the web app, then any other services whose files changed (compare the commit range, skip what did not change).
- Post-deploy hooks: anything that must re-register with the new deploy (job queues, webhooks).
- Smoke test production with a script that retries for about two minutes (see the production-smoke-test kit).
- Roll back to the recorded deployment if the smoke test fails, then fail the run so the team is notified.
Steps
- Read the existing CI workflow and the deploy commands the project already uses. Ask which hosting providers are in play; do not guess.
- Write
.github/workflows/release.ymlwith the steps above. Pin every action to a full commit SHA with the version in a comment. - List the repository secrets the workflow needs (names only). Tell the person to add them with
gh secret set NAME, typing the value themselves. Never ask for or print a secret value. - If the host also deploys on every git push, turn that off in its config so there is one path to production.
- Explain how to roll back by hand and where the run logs are.
Rules
- No manual approval steps unless the person asks for one.
- Never put secrets in the workflow file, logs, or commit messages.
- Least privilege:
permissions: contents: readat the top, wider only on the job that needs it.
Files
- SKILL.md
- kit.json
Did it work?
0worked for them0did not work
Sign in to say whether it worked for you.
Nobody has said yet. Tried it? Tell the next person.
