Skip to content

Releasing ​

How a vz release is cut: a tag, and a GitHub Actions build that publishes the release tarball. The tag is the only place a version is written; no code change is needed. This page is for maintainers.

Overview ​

1. Pick the version ​

Versions are major.minor.patch:

Change since the last releaseBumpExample
Bug fixes, docs, a new imagepatch1.0.1
A new lab file key, command or flagminor1.1.0
A breaking lab file change, such as a new macOS schema (schemaVersion: 28)major2.0.0

version, commit and run in Sources/LabCore/Product.swift stay "dev", "" and "" in the repository. Do not edit them: the release workflow sets them, so a release prints 1.1.0 (commit abc1234, release #12) for vz --version. A binary you build yourself (make build, make release) prints dev.

Make sure CI is green on the commit you tag.

2. Tag and push ​

bash
git tag v1.1.0
git push origin v1.1.0

The tag must be v followed by major.minor.patch. The workflow refuses anything else.

3. The release workflow ​

Pushing a v* tag runs .github/workflows/release.yml on a macOS 27 runner (xcode-27). It:

  1. Sets version (the tag without its v), commit and run (the workflow name and run number) in Product.swift.

  2. Builds swift build -c release --arch arm64.

  3. Signs the binary ad hoc with entitlements.plist using scripts/sign.sh.

  4. Checks that vz version reports the tag.

  5. Packages the make install layout, so users unpack it straight into /usr/local. The binary looks for the schema and examples in ../share/vz. The completion scripts come from the built binary (vz completion zsh|bash) and go where zsh and bash-completion find them without setup:

    text
    bin/vz
    share/vz/schema/27.json
    share/vz/examples/...
    share/vz/LICENSE
    share/vz/README.md
    share/zsh/site-functions/_vz
    share/bash-completion/completions/vz

    The archive holds files only, owned by root, with no directory entries, so sudo tar -xz -C /usr/local never changes the owner or mode of an existing /usr/local/bin.

  6. Writes vz-darwin-arm64.tar.gz and checksums.txt (SHA-256). The names carry no version on purpose: the README and the installation guide link to releases/latest/download/<name>, which only works while every release uses the same names.

  7. Creates the GitHub release with both files and release notes generated by GitHub (gh release create --generate-notes). If the release already exists, because it was published on github.com (which creates the tag and starts this workflow), it uploads the two files to it instead.

Before building, the workflow stops when the tag is not v<major>.<minor>.<patch>.

To rebuild the files of an existing tag, run the workflow by hand: Actions > release > Run workflow, with the tag (for example v1.0.0). It builds that tag and replaces the attached files.

4. Check it the way users get it ​

Install the published tarball the way the README tells users to:

bash
curl -fsSL https://github.com/rayanparsa/vz/releases/latest/download/vz-darwin-arm64.tar.gz | sudo tar -xz -C /usr/local
vz --version     # must print the new version

The release notes come from GitHub's generated notes. Edit them on the release page if they need context.

See also ​