{
    "$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
    "version": "1.8",
    "publicReleaseRefSpec": [
        "^refs/heads/master$",
        "^refs/heads/release$"
    ],
    "cloudBuild": {
        "setVersionVariables": true,
        "buildNumber": {
            "enabled": true,
            "includeCommitId": {
                "when": "nonPublicReleaseOnly",
                "where": "buildMetadata"
            }
        }
    }
}
{
    "$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
    "version": "1.8",
    "publicReleaseRefSpec": [
        "^refs/heads/release$"
    ],
    "cloudBuild": {
        "setVersionVariables": true,
        "buildNumber": {
            "enabled": true,
            "includeCommitId": {
                "when": "nonPublicReleaseOnly",
                "where": "buildMetadata"
            }
        }
    }
}

Remove master branch from publicReleaseRefSpec
Remove master branch from publicReleaseRefSpec

Master is also a pre-release branch