A release is started by a person, everything else is automatic. You decide when (and whether it is a patch, minor or major version); the workflow decides nothing and skips no check.
- Make sure
maincontains what you want to ship (and is green). - GitHub → Actions → Release → Run workflow on
main, or from a terminal:gh workflow run release.yml -f bump=minor # patch (default) | minor | major gh workflow run release.yml -f version=v1.0.0 # an explicit version instead of a bump gh workflow run release.yml -f dry_run=true # show the version and release notes, publish nothing gh workflow run release.yml -f draft=true # create a draft release you publish by hand - That's it. The run takes as long as the test suite (~10 minutes).
plan ──► build (build.yml) ─┐
└─► tests (tests.yml) ─┴─► release ──► verify
- plan – works out the next version from the latest
vX.Y.Zgit tag (scripts/releasing/next_version.sh; it refuses a version that already exists or is not newer). Only runs frommain. - build + tests – the same workflows that gate every pull request, run on the exact commit being released. A red
test means no release. The
plugin.wasmthey build is the one that gets published (it is never rebuilt). - release – writes the notes (the sha256, a ready-to-paste sqlc config, and GitHub's generated list of merged pull
requests, grouped by label as configured in
.github/release.yml), then creates the tag and the GitHub release withsqlc-gen-ruby.wasmandsqlc-gen-ruby.wasm.sha256attached. - verify – plays the user: downloads the plugin from the release's public URL, checks the sha256 and runs
sqlc diffwith it over the examples. If this fails, fix forward and release again (a published tag is not rewritten).
Semantic versioning, tags are vMAJOR.MINOR.PATCH. The version describes the generated
code and the options, because that is what users depend on:
| Bump | When |
|---|---|
| patch | bug fixes; output changes that cannot break callers (comments, formatting, a fixed type) |
| minor | new options, new query features, new drivers; output that only adds API (e.g. a new method) |
| major | existing generated method signatures, constants or options change incompatibly |
Label pull requests bug, enhancement or documentation (breaking for incompatible changes, skip-changelog to
hide one; create those two labels the first time they are needed) so the generated notes
are grouped sensibly, and pick the bump from the labels of what is merged since the last release.
plugins:
- name: ruby
wasm:
url: https://github.com/DaredevilOSS/sqlc-gen-ruby/releases/download/v0.1.0/sqlc-gen-ruby.wasm
sha256: <the sha256 in the release notes>- Dry run first when unsure:
-f dry_run=trueruns the whole gate and prints the notes without publishing. - A published release is bad: mark it as a pre-release or delete the release and its tag in the GitHub UI, then fix and release the next version. Do not re-use a version number: users pin the sha256 of a version.
- The workflow cannot find a tag / wrong version: the version comes from
git tag; check that tags are intact (git ls-remote --tags origin).