Skip to content

Release boxfork

This page is for the maintainers of boxfork. It tells you how to make a release, what the release workflow does, and how to take a release back. It also tells you how the site boxfork.dev is deployed. Decision 23 gives the reasons.

  • A tag vMAJOR.MINOR.PATCH on main makes a release. Push the tag, and .github/workflows/release.yml does all the work.
  • The workflow tests first. Then it pushes four images to GHCR, attests the files and the images with Sigstore, and makes the GitHub Release. Then it installs the release as a user does, and it verifies an archive and an image.
  • The jobs that publish need the GitHub environments of Set up the repository.
  • A dry run builds and tests the same files and images, and publishes nothing.
  • Do not move or delete a tag that made a release. To correct a release, make a new patch release.

Do these steps one time, before the first tag, in the settings of the repository on GitHub, under Environments. If a workflow uses an environment that does not exist, GitHub makes the environment with no rules. Thus make the two environments first.

Environment Deployment branches and tags Secrets Jobs that use it
release Selected branches and tags: the tag rule v* only None. The jobs use the token of the run. publish <image> and publish the release of release.yml
site Selected branches and tags: the branch main only CLOUDFLARE_API_TOKEN deploy to boxfork.dev of deploy-site.yml
  • Put CLOUDFLARE_API_TOKEN in the environment site only. Delete the repository secret of the same name, if it exists. Then only the deploy job can read the token.
  • The variable CLOUDFLARE_ACCOUNT_ID stays a variable of the repository. It is not a secret.
  • The workflows also have their own checks: a job that publishes runs only for a tag, and the deploy runs only on main. The environments add a second check that a change to a workflow file on a branch cannot remove.

The version has the form MAJOR.MINOR.PATCH, as Semantic Versioning gives it. The tag is the version with a v before it, for example v0.1.0.

  • Increase PATCH for a release with fixes only.
  • Increase MINOR for a release with new features.
  • Increase MAJOR for a release that changes the API, the CLI or the chart in a way that breaks a client. Before version 1.0.0, MINOR can also break a client. Say so in the release notes.

The workflow stops for a tag of a different form, for example v0.1.0-rc.1 or v0.1. It also stops if the commit of the tag is not on main.

  1. Make sure that the last runs of fast, e2e and k8s-e2e on main passed.

  2. Do a dry run on main. On 6 December 2026, a dry run took 6 minutes:

    Terminal window
    gh workflow run release.yml --ref main -f dry_run=true
    gh run watch
  3. Read the release notes in the summary of the dry run, under the job version and release notes.

  4. Set appVersion in operator/chart/Chart.yaml to the new version, in a pull request, and merge it. The chart uses appVersion as the tag of its default images. The workflow stops for a tag with a different appVersion.

  5. Make the tag on the last commit of main, and push it:

    Terminal window
    git fetch origin
    git tag -a v0.1.0 -m "boxfork 0.1.0" origin/main
    git push origin v0.1.0
  6. Watch the run that the tag started: gh run watch. For the first release only: GHCR makes a new package private. When the run passed, open the settings of the four packages on GHCR. Make each package public.

  7. Make sure that the job install and verify the release as a user does passed. It runs the install command of the release notes on a new runner, and it runs one sandbox. It also does the steps of Verify a release on the archive for amd64 and on the image boxfork.

The jobs before the publication run for each tag and for each dry run:

Job What it does
version and release notes It reads the version from the tag and does the checks of the tag. It writes the release notes: the install command, the verify commands, the images and the commits since the last tag.
fast, e2e The workflows fast.yml and e2e.yml, called as they are. testing.md tells what they prove.
archives and checksums make dist with the version, and with the address of the release in RELEASE. Then SHA256SUMS, the checksums of the archives, install.sh and cloud-startup.sh. It runs make dist two times, and makes sure that the two builds give the same files.
install on amd64, install on arm64 On a runner of that chip type: it checks the checksums, and it runs install.sh from standard input, as curl ... | sudo sh does, with --isolation gvisor. Then it runs one sandbox with the CLI and makes sure that the sandbox runs under gVisor.
image boxfork, image boxfork-operator, image boxfork-helper, image boxfork-control It builds the image for amd64 and arm64 into a file, with the time of the commit on the files in the image. It records the digest of the image in the file. It pushes the file to a registry on the runner with the same digest, makes sure that the image has the two chip types, and runs the amd64 image.
image <image> on arm64 On an arm64 runner: it pushes the same file to a registry on the runner with the same digest, and runs the arm64 image.

The jobs of the publication run only for a tag, and only when all jobs above passed:

Job What it does
publish <image> In the environment release. It pushes the image file that the job image <image> wrote to ghcr.io/mvplab-ai/<image>:<version>. It does not build again. The push keeps the digest, and the job stops if GHCR has a different digest from the digest that the job image <image> recorded. Then it attests the image and pushes the attestation to GHCR.
publish the release In the environment release. It attests each file. Then it makes the GitHub Release of the tag with the files, the attestation bundle boxfork-<version>.sigstore.json and the release notes. The release becomes the latest release only if its version is the highest version of all tags.

After the publication, one more job runs:

Job What it does
install and verify the release as a user does On a new runner, it runs curl -fsSL https://github.com/mvplab-ai/boxfork/releases/download/<tag>/install.sh | sudo sh, and runs one sandbox under gVisor. Then it runs gh attestation verify with --repo, --signer-workflow and --source-ref on the archive for amd64 and on the image boxfork. It also makes sure that the archive does not verify with --source-ref refs/heads/main.

Only the jobs of the publication have the permissions to write: contents: write for the release, packages: write for GHCR, and id-token: write and attestations: write for Sigstore. All other jobs can only read the repository.

The address of the release is https://github.com/mvplab-ai/boxfork/releases/download/<tag>. make dist writes it into the copies of install.sh and cloud-startup.sh in the release. Thus the installer of a release installs the archive of the same release.

A dry run is a run of the workflow by hand with dry_run on, which is the default. A pull request that changes release.yml also starts a dry run.

A dry run does all the jobs before the publication, with the version 0.0.0-dryrun.<commit>. It does not push an image to GHCR, it does not sign, and it does not make a release. Thus a dry run writes nothing to the public transparency log of Sigstore. A pull request does not run fast and e2e again in the dry run, because the pull request runs them already.

A run by hand with dry_run off on a branch stops at once. Only a tag makes a release.

  • If a job before the publication fails, nothing was published. Fix the cause on main. Then delete the tag and push it again on the new commit:

    Terminal window
    git push origin :refs/tags/v0.1.0
    git tag -d v0.1.0
  • If a job of the publication fails, run the failed jobs again: gh run rerun <run id> --failed. A second push of the same image file gives the same digest. A second attestation of the same file is permitted.

  • If publish the release fails after it made the release, delete the release with gh release delete v0.1.0, and run the job again.

  • If install and verify the release as a user does fails, the release is public already. Read the log of the job. If a user cannot install the release or verify its files, take the release back as Take a release back tells. For the first release, the job can fail because the packages on GHCR are private. Make the packages public, and run the job again.

Caution: Do not move or delete a tag after its release was published. Users, scripts and attestations refer to the tag. A different commit under the same tag breaks the trust in each release.

To take a bad release back:

  1. Make the release before it the latest release again:

    Terminal window
    gh release edit v0.1.0 --latest

    The address releases/latest/download/install.sh then installs that release.

  2. Mark the bad release as a pre-release, and add the reason to its notes: gh release edit v0.1.1 --prerelease --notes-file <file>.

  3. Fix the cause on main, and make a new patch release, for example v0.1.2.

If the bad release is dangerous, also delete its files with gh release delete v0.1.1, and delete its images in the package settings of GHCR. Keep the tag. The attestations stay in the transparency log. An attestation tells where a file came from. It does not tell that the file is good.

A user goes back to an earlier release with the installer of that release. The installer replaces the binary and keeps the settings of the service:

Terminal window
curl -fsSL https://github.com/mvplab-ai/boxfork/releases/download/v0.1.0/install.sh | sudo sh

On Kubernetes, give the earlier tag of the images to helm upgrade, as install.md tells.

.github/workflows/deploy-site.yml deploys boxfork.dev, the Worker boxfork-site. It runs for each push to main that changes docs/, site/ or ROADMAP.md.

  1. The job build the site writes the commit into site/public/version.txt and runs npm run build. The build fails on a broken link, a broken anchor or a diagram that shows as code. Then cf deploy --dry-run reads the settings of the Worker in site/cloudflare.config.ts, without credentials.
  2. The job deploy to boxfork.dev runs in the environment site. First, it makes sure that the site of main is the site of this commit, as the list below tells. Then it runs cf deploy ./dist with the secret CLOUDFLARE_API_TOKEN of the environment and the variable CLOUDFLARE_ACCOUNT_ID.
  3. Then it reads https://boxfork.dev/version.txt until it shows the commit, and it makes sure that some pages answer with 200.

npm ci runs with --ignore-scripts, so no package runs a script when it installs. Only the step cf deploy gets the token.

Only a push to main of mvplab-ai/boxfork deploys, or a run by hand on main with dry_run off. A pull request and a fork never deploy. A pull request that changes the workflow runs the job build the site only.

The site of an older commit never replaces the site of a newer commit:

  • Only one run of the workflow for main runs at a time, in the order of the pushes. A run that waits is replaced by a newer run. A run under way is not stopped.
  • Just before the deploy, the job reads the last commit of main. If a newer commit changed docs/, site/, ROADMAP.md or the workflow, the job deploys nothing: the run of the newer commit deploys the site. If newer commits changed other files only, the job deploys, because the site of this commit is the site of main.

To deploy by hand, for example after a change of the token:

Terminal window
gh workflow run deploy-site.yml --ref main -f dry_run=false

To take a deploy of the site back, revert the commit on main. The workflow then deploys the site of the commit before it.

  • No release is published yet. The jobs of the publication and the job install and verify the release as a user does did not run. A dry run cannot run them: they need a tag, and the jobs of the publication need the environment release. The jobs before the publication passed in a dry run on 6 December 2026 (testing.md).
  • Nobody ran the commands of Verify a release on a release of boxfork.
  • The deploy of the site from the workflow did not run yet, because it runs only on main in the environment site. A local test ran the step that compares the commit with main, on seven states of main.