57 lines
2.2 KiB
Markdown
57 lines
2.2 KiB
Markdown
# Releasing
|
|
|
|
One `v*` tag names a release. One version covers every process in the host
|
|
bundle (`archied`, `archie-gateway`, `archie-state-store`, `archie-ui`,
|
|
`archie-messaging`) and the `archie-agent` image. Nothing is released from a
|
|
laptop.
|
|
|
|
## Cutting a release
|
|
|
|
Dispatch the **release** workflow (`.github/workflows/release.yml`) with
|
|
`major`, `minor`, `patch` or an exact version. It runs `task release` on
|
|
`main`, which refuses a dirty tree or an existing tag and then tags `vx.y.z`,
|
|
and pushes the tag with `DEPLOY_TOKEN`. A push made with the job token
|
|
wouldn't start other workflows, so the user token is what lets the tag start
|
|
the deploy.
|
|
|
|
## What a release publishes
|
|
|
|
The tag push runs `deploy.yml`:
|
|
|
|
- **Gate.** `task check dist TEST_FLAGS=-count=1` and `govulncheck`. The
|
|
binaries the zip ships are built in the same run, so nothing is compiled
|
|
again after the gate.
|
|
- **Images.** `archied:v<version>` and `archie-agent:v<version>`, plus
|
|
`sha-<commit>` tags. `:latest` moves only on promotion.
|
|
- **The signed release.** `archied release publish` signs a statement
|
|
(version, issued_at, zip digest, agent image by digest) with
|
|
`RELEASE_SIGNING_KEY` and pushes it with the distribution zip to
|
|
`git.catlow.cloud/sam/archie` as `v<version>` and `next`. It never moves
|
|
`stable`.
|
|
- **The release page** on Gitea, listing the commit subjects since the
|
|
previous tag. The statement links to it.
|
|
|
|
Actions run the workflow from the tagged commit, so a fix to `deploy.yml`
|
|
reaches a release only if it is an ancestor of the tag. Cut a new release
|
|
rather than committing the fix on top of a tagged one.
|
|
|
|
## Promote
|
|
|
|
Dispatch the **promote** workflow (`.github/workflows/promote.yml`) with a
|
|
`version`. It retags `stable` to that release and moves the `archied` and
|
|
`archie-agent` images' `:latest` to it. Promotion refuses a prerelease and a
|
|
release issued before the one `stable` names, the same replay rule hosts
|
|
enforce. The same thing by hand:
|
|
|
|
```bash
|
|
archied release promote -version 1.63.0 \
|
|
-latest git.catlow.cloud/sam/archied,git.catlow.cloud/sam/archie-agent
|
|
```
|
|
|
|
## Secrets
|
|
|
|
| Name | Used by |
|
|
|---|---|
|
|
| `DEPLOY_TOKEN` | release, deploy, promote: the registry push, the tag push and the package links |
|
|
| `RELEASE_SIGNING_KEY` | deploy: signs the release statement |
|