Repository navigation
Stable releases publish NuGet over OIDC and reach the real Homebrew tap and Scoop bucket - #129
Merged
Merged
Conversation
… and Scoop bucket - NuGet: trusted publishing via NuGet/login (OIDC), no stored API key. A nuget-oidc-preflight job proves the nuget.org policy before anything publishes. - Homebrew/Scoop: target Nimblesite/homebrew-tap and Nimblesite/scoop-bucket with the org BREW_SCOOP_PAT; the previous repos and secrets did not exist. - Formula installs the full archive into libexec so DataProviderMigrate finds its SQLite native library; parallel tap/bucket pushes rebase and retry. - DataProviderMigrate --version / -V for the formula test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Make a stable (non-prerelease) release publish end to end: NuGet over OIDC trusted publishing, and Homebrew/Scoop to the repositories that actually exist.
What Was Added?
nuget-oidc-preflightjob inrelease.yml. It exchanges a GitHub OIDC token with nuget.org (NuGet/login, pinned to v1.2.0) before any job publishes.publish-nuget,release-binariesandrelease-dotnet-binariesall wait for it, so a missing or mismatched trusted-publishing policy stops the release before anything ships. It also runs in the manual preflight.DataProviderMigrate --version/-V: prints the stamped release version (for example0.11.0) without build metadata. The Homebrew formula test runs it.DataProviderMigrateVersionTests(in-process) andNativeAotMigrateSmokeTests.NativeBinary_Version_PrintsReleaseVersion(native binary).What Was Changed or Deleted?
Every release so far was a beta, so the stable-only Homebrew/Scoop jobs had never run. A stable
v0.11.0tag would have hit these problems:Nimblesite/homebrew-lqlandNimblesite/scoop-lql, which don't exist. They now targetNimblesite/homebrew-tapandNimblesite/scoop-bucket, where the other Nimblesite tools publish.HOMEBREW_TAP_TOKENandSCOOP_BUCKET_TOKEN, which aren't set anywhere. They now use the org secretBREW_SCOOP_PAT, which the other Nimblesite repos use. GitHub has no OIDC path for pushing to another repository.DataProviderMigrate: the formula didbin.install "DataProviderMigrate", leavinglibe_sqlite3.dylibbehind. On its own, the native binary crashes inSqliteConnection..ctor. The formula now installs the whole archive intolibexecand puts an exec script inbin(bin.write_exec_script).lql-lspandDataProviderMigratepush to the same tap and bucket from parallel jobs. Each push now rebases and retries up to 5 times, with a full-history checkout.publish-nugetnow uses OIDC trusted publishing (user: Nimblesite, environmentrelease) with a short-lived key minted right before the push. It no longer reads theNUGET_API_KEYsecret.How Do The Automated Tests Prove It Works?
DataProviderMigrateVersionTests.Main_VersionFlag_PrintsReleaseVersion(--version,-V): exit 0, printsmajor.minor.patch[-pre], which is a prefix of the assembly's informational version.make aot RID=linux-x64passes. All 5NativeAotMigrateSmokeTestspass against the published native binary, includingNativeBinary_Version_PrintsReleaseVersion. A build with-p:Version=0.11.0prints0.11.0.libexec, an exec script in another directory, run from a third working directory.migrate --provider sqlitepassed, including the integrity check. The binary copied on its own (the old formula's layout) crashes loading SQLite.dataprovider-migrate, andruby -creportsSyntax OK.make cipasses.Spec / Doc Changes
docs/specs/ci-spec.md: new[CI-RELEASE-NUGET-OIDC]and[CI-RELEASE-BREW-SCOOP]sections.[CI-RELEASE-PREFLIGHT]now lists NuGet trusted publishing.docs/specs/migration-spec.md[MIG-CLI-COMMANDS]: documents--version.Breaking Changes
Nimblesitefor repositoryNimblesite/DataProvider, workflowrelease.yml, environmentrelease. Without it, the release stops atnuget-oidc-preflightbefore publishing anything.