Development¶
Releasing¶
A release publishes five archives with one SHA256SUMS file, and an image for two platforms. The Release workflow
runs on a published release, on a manual dispatch, and on a pull request that touches one of its six inputs:
.dockerignore, .github/workflows/release.yml, Cargo.lock, Cargo.toml, Dockerfile and rust-toolchain.toml. It
runs on no push, so a change to src/ gets its release build with the next dry run or release, and the Tests workflow
covers it until then. To release:
- On the day of the release, resolve the Dockerfile's one pinned digest again, the runtime base's, under the tag that
the comment above its
FROMline names.docker buildx imagetools inspect <tag>prints the tag's current digest. Where the tag moved, write the new digest into theFROMline and the day into the comment above it, and commit the change tomain. A release on a later day than its dry run resolves the digest again, and a tag that moved by then takes a new commit and a new dry run. A base update reaches a published image with the next release and no earlier, and a version tag stays on the one build that its release made. - Set
versionunder[package]inCargo.tomlto the version (X.Y.Z, orX.Y.Z-rc.1for a prerelease), rename the changelog's## Unreleasedheading to## X.Y.Z, or write that section where no change opened one, and merge tomain. The changelog's heading and the release's tag are the version exactly as this step sets it, a suffix included:## X.Y.Z-rc.1and the tagX.Y.Z-rc.1for a prerelease. A version with a suffix is a prerelease: its image takes none of the tagsX.Y,Xandlatest, and step 3 creates its release as a prerelease. The version change movesCargo.locktoo: runcargo update --workspaceto write it and commit both files, since each build runs with--locked. - Run the manual dispatch as the dry run on the head of
mainonce the changes of steps 1 and 2 are on it, also for a release whose step 1 moved no pin. Then create the release on GitHub with the tagX.Y.Z, novprefix, at the commit that the dry run proved, with the version as its title and a link to the changelog page in its notes. Create the release of a version with a suffix as a prerelease. Publishing it starts the workflow. - On each event the guard refuses a package version that is not
X.Y.ZorX.Y.Z-suffix(Cargo.toml states a package version that is not X.Y.Z or X.Y.Z-suffix). On a pull request and on a dry run it refuses a changelog with no section for that version (docs/site/changelog.md has no '## {version}' section for the package version), so the dry run of step 3 shows a missed heading before the release exists. On a release it refuses the release before anything builds when the tag has another form (release tag '{TAG}' is not X.Y.Z or X.Y.Z-suffix), differs from the package version (release tag '{TAG}' differs from the package version '{version}' in Cargo.toml), or has no section in the changelog (docs/site/changelog.md has no '## {TAG}' section for this release). It refuses a release whose prerelease mark disagrees with its tag too: a tag with a suffix on a release that is not marked as a prerelease (release tag '{TAG}' has a suffix, and the release is not marked as a prerelease), and a tag with no suffix on a release that is marked as one (release tag '{TAG}' has no suffix, and the release is marked as a prerelease). Otherwise the run builds two images,linux/amd64onubuntu-24.04andlinux/arm64onubuntu-24.04-arm, and pushes each by digest. Each image runs through--version, which must printphoebis-proxy {VERSION}. The run builds five archives, each on a runner of its own platform, foraarch64-apple-darwin,aarch64-unknown-linux-musl,x86_64-apple-darwin,x86_64-pc-windows-msvcandx86_64-unknown-linux-musl. Each binary runs through--versionas the images do, and the two Linux binaries pass a static link check. An archive holds the binary and the license, asphoebis-proxy-{VERSION}-{TARGET}.tar.gz, or.zipfor Windows. Once each image and each archive has passed, the run checks that the version's own tag is among the tags to write and that the pushed digests make a manifest list with amd64 and arm64, and it writes no tag where either check fails. It then publishes that list atghcr.io/phoebis-project/phoebis-proxyunderX.Y.Z,X.Y,X(from major 1),latestandsha-<short sha>, with none ofX.Y,Xandlatestfor a prerelease, and uploads the five archives withSHA256SUMSto the release.
A manual dispatch (Actions, Release, Run workflow) is the dry run: it builds and smokes each target and both platforms
and pushes nothing. Run it on main after a change to a packaging input and ahead of each release. A release whose run
fails for a reason in its commit is deleted with its tag and created again at the corrected commit behind a green dry
run, as long as the run published no image tag and no archive under the version. Once an image tag or an archive is
public, the correction ships as the next patch version. A release that the guard refuses for its prerelease mark is
deleted with its tag and created again with the right mark at the same commit as long as no image tag and no archive of
the version is public, since a second run of the workflow reads the first event and a changed mark starts no run, and a
version with one of them public takes the next patch version. A change that an operator sees writes its entry under
## Unreleased, the first section of the changelog, and step 2 renames that heading to the version.