Maintainer guide
Repository settings checklist
These settings cannot be expressed as files in the repository and must be configured in the GitHub UI or API.
- Branch ruleset on
main: require a pull request, 1 approving review from CODEOWNERS, required status checks (allci.ymlandsecurity.ymljobs), linear history, signed commits, block force pushes and deletion. - Tag ruleset for
v*: only maintainers and the release GitHub App (see below) may create tags; block updates and deletion. - Secret scanning and push protection enabled.
- Private vulnerability reporting enabled (used by
SECURITY.md). - Dependabot alerts and security updates enabled.
- Code scanning enabled (receives CodeQL and Scorecard SARIF).
- Environment
releasewith required reviewers, deployments limited tomain(crates.io publishing) and tagsv*(binaries, image, packages). - Environment
release-plzwithout reviewers, deployments limited tomain(opens the release pull request). - Environment
nextdns-e2ewith required reviewers, holdingNEXTDNS_E2E_API_KEYandNEXTDNS_E2E_PROFILE_ID. - GitHub Pages source set to GitHub Actions (
docs.ymldeploys the book on every push tomainthat changesdocs/). - After the first crates.io release, set the repository variable
SEMVER_CHECKS_ENABLEDtotrueto runcargo semver-checkson pull requests. - Immutable releases enabled, if available for the account.
- Codecov: repository activated, OIDC upload allowed.
- Actions settings: “Read repository contents” as default
GITHUB_TOKENpermission; Actions may not create or approve pull requests (release-plz uses its GitHub App instead).
Releases
Releases are cut by merging the pull request that release-plz keeps open on
main (chore: release vX.Y.Z):
Before merging it, run the E2E workflow by hand (Actions, Run workflow) and
approve the nextdns-e2e environment. It does not run on a schedule.
release-plz.ymlopens or updates that pull request on every push tomain: version bump ofndac,ndac-coreandndac-api(one version for all three) and the newCHANGELOG.mdsection.- Merging it runs the
publishjob in thereleaseenvironment: it publishes the three crates to crates.io with trusted publishing, creates the tagvX.Y.Zand a draft GitHub release. - The tag starts
release.yml: binaries for six targets built withcargo auditable, archives with completions, the man page and the systemd units,.deband.rpmpackages, a CycloneDX SBOM,SHA256SUMSsigned with cosign, build provenance attestations (also attached asndac-X.Y.Z.intoto.jsonl), and the imageghcr.io/esl1h/ndac(signed, with SBOM and provenance). The draft release is published once every asset is uploaded, so it also works with immutable releases. - Publishing the release starts
packaging.yml, which updates the AUR packagendac-binand triggers the COPR build, when enabled.
just release-dry builds this host’s archive and SHA256SUMS into
target/dist the same way, without publishing anything.
One-time setup
- GitHub App for release-plz, installed on this repository only, with
repository permissions Contents and Pull requests set to read and write.
Pull requests and tags created with
GITHUB_TOKENwould not start workflows. Store its client ID as the variableRELEASE_APP_CLIENT_IDand a private key as the secretRELEASE_APP_PRIVATE_KEYin both therelease-plzandreleaseenvironments. - crates.io: trusted publishing cannot create a crate, so the first
version is published by hand. Set the workspace version (for example
0.1.0), thencargo publish -p ndac-api,-p ndac-coreand-p ndacwith a short-lived token, in that order. Then, for each crate, add a trusted publisher: repositoryEsl1h/ndac, workflowrelease-plz.yml, environmentrelease. Revoke the token. Push the tagv0.1.0by hand for the first binary release. - Enable release-plz: once the App and the crates exist, set the
repository variable
RELEASE_PLZ_ENABLEDtotrue. Until thenrelease-plz.ymlskips its jobs. - GHCR: after the first image push, make the package
ghcr.io/esl1h/ndacpublic and link it to this repository. - AUR (optional): create the package
ndac-binon the AUR with a dedicated SSH key. Store the private key as the secretAUR_SSH_PRIVATE_KEYin thereleaseenvironment, the commit identity as the variablesAUR_GIT_NAMEandAUR_GIT_EMAIL, and set the variableAUR_ENABLEDtotrue. - COPR (optional): create a COPR project with a package
ndacusing the SCM source, the “make srpm” method, this repository and specpackaging/rpm/ndac.spec; chroots for Fedora on x86_64 and aarch64. Store its custom webhook URL as the secretCOPR_WEBHOOK_URLin thereleaseenvironment and set the variableCOPR_ENABLEDtotrue.
Verifying a release
gh attestation verify ndac-0.1.0-x86_64-unknown-linux-musl.tar.gz --repo Esl1h/ndac
cosign verify-blob SHA256SUMS --bundle SHA256SUMS.sigstore.json \
--certificate-identity "https://github.com/Esl1h/ndac/.github/workflows/release.yml@refs/tags/v0.1.0" \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
sha256sum -c --ignore-missing SHA256SUMS
cosign verify ghcr.io/esl1h/ndac:v0.1.0 \
--certificate-identity "https://github.com/Esl1h/ndac/.github/workflows/release.yml@refs/tags/v0.1.0" \
--certificate-oidc-issuer https://token.actions.githubusercontent.com