Skip to content

Gate 0: protect main, require the CI gate, set up trusted publishing for the new ids #14

Open

Description

@CaffeinatedCoder

2026-11-11, later: every settings item is done. The NUGET_USER secret is in the nuget environment (read back by name), and the maintainer reports the nuget.org trusted-publishing policy created (not readable from here). What keeps this open is release.yml (#35): the second half of "Done when", the dry run reaching the publish job's approval, cannot be shown before it exists.

2026-11-11: the GitHub settings are in place, each read back through the API. Outstanding: the NUGET_USER secret and the nuget.org trusted-publishing policy, both the maintainer's, and release.yml (#35). The issue stays open until the policy exists.

  • main is protected: CI and Labels and issue link required (GitHub Actions), pull requests required with 0 approvals, force pushes and deletions off. Two choices the list below does not make: "branch up to date before merging" is off (EFCore.ComplexIndexes has it on), and "do not allow bypassing" is off, so the admin can still merge past a red check. The first half of "Done when" holds for everyone else; switch enforce_admins on to make it hold for the admin too.
  • Private vulnerability reporting is enabled.
  • The Roadmap (Roadmap #13) is pinned.
  • The nuget environment exists, set up like the one in EFCore.ComplexIndexes: required reviewer CaffeinatedCoder, deployments from tags v* only. It holds no secret yet.
  • NUGET_USER: gh secret set NUGET_USER --env nuget -R CaffeinatedCoder/CodoMetis.EFCore.SchemaKit (it prompts for the value: the nuget.org profile name, not the email address).
  • nuget.org, Trusted Publishing, new policy: repository owner CaffeinatedCoder, repository CodoMetis.EFCore.SchemaKit, workflow file release.yml, environment nuget, with the policy owner/scope that allows pushing new package ids.

Problem

The repository starts with a workflow (dotnet.yml, one lane and the CI gate), PR hygiene and no protection. Nothing can be published from it.

Change

Settings only the maintainer can change:

  • Protect main: require CI and Labels and issue link, pull requests with 0 approvals, no force push.
  • Enable private vulnerability reporting (SECURITY.md links security/advisories/new).
  • Pin the Roadmap issue.
  • Create the nuget environment
  • and the NUGET_USER secret.
  • On nuget.org, a trusted-publishing policy for owner, repository CodoMetis.EFCore.SchemaKit, workflow release.yml and environment nuget, with the scope that allows pushing new package ids.

In the repository:

Done when

A PR cannot merge with a failing or skipped lane, and a dry run of the release workflow reaches the publish job's approval.

Activity

  1. added this to the 11.0.0 milestone on Nov 11, 2026
  2. added
    chore
    area/release
    on Nov 11, 2026
  3. CaffeinatedCoder commented on Nov 16, 2026

    @CaffeinatedCoder
    OwnerAuthor

    Since #161 (closes #151), a dry run of release.yml from main no longer stops at the — unreleased heading of 11.0.0-preview.1: the notes step warns and goes on, so a run can now get through Build, Pack, the pack checks and the SBOMs to the publish job's approval once #161 is merged.

    One thing that rests on the environment, not on the file: the step tells a tag from a dry run by GITHUB_REF, so a manual run from a branch with dry_run unchecked also passes the step with dry-run notes and reaches publish. What stops it there is item 1 above, the environment nuget taking deployments from tags v* only. Worth checking that rule when the dry run reaches the approval.

  4. CaffeinatedCoder commented on Nov 17, 2026

    @CaffeinatedCoder
    OwnerAuthor

    2026-11-17: a dry run of release.yml from main @ 0ea7940 passed (run 44037778816, dry_run=true, 8 minutes).

    • ci: every lane of dotnet.yml green, the CI gate included (tests, API probes, integration on PostgreSQL 16 and 18 and SQL Server 2022, both consumer smoke tests, spikes).
    • verify: build, pack, SBOMs and pack checks green; artifact nupkg-11.0.0-preview.1 uploaded. The notes step warned as release.yml: a dry run stops at the changelog's '— unreleased' heading #151 meant it to: "The heading of 11.0.0-preview.1 in CHANGELOG.md is not '## [11.0.0-preview.1] — yyyy-mm-dd'. A tag for 11.0.0-preview.1 would stop here."
    • publish and release: skipped, as a dry run must.

    What a dry run cannot show: the publish job's approval. A dispatch with dry_run=true skips publish by its condition, and one with dry_run=false from main is refused by the nuget environment, which takes deployments from tags v* only (read back today: custom_branch_policies, policy tag v*, required reviewer). The approval is first reached by the tag v11.0.0-preview.1 itself, where the maintainer approves or rejects it. This issue closes there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/releasechore

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions