Repository navigation
Return to the manual release process: restore package.yml, remove the publish automation - #1375
Conversation
Go back to the 1.x release model. CI packs the packages and uploads them as workflow artifacts, and the release engineer downloads them and pushes them to nuget.org by hand. - Delete publish.yml, release-dry-run.yml and cake-build/tasks/release.cake, with every release-only Cake task and target and their wiring (_Version and Package no longer depend on the release checks). - Restore package.yml from main, adapted to the 2.0 packages: a Windows job packs the three NuGet packages and runs the package-install test (Test.PackageConsumption.NoPack) on them on the .NET Framework CLR, an Ubuntu job builds the Unity package, and output-package holds exactly the three .nupkg files and the .unitypackage. The Android, Xamarin and push package parts are gone with the packages they built. - Run the full Test.PackageConsumption as the last step of the Windows (NetFramework) workflow, so every PR still runs the package-install test on the .NET Framework CLR, alongside the existing Mono step. - Move the package set, NuspecDirectory() and PackageOutputDirectory() (behind --packageOutput) into package.cake, and point package-consumption.cake at them. - Make Package, package.cmd and package-unity.sh fail without a version instead of succeeding with nothing packed. - Update the comments, the PackagingSpecs summary and cake-build/README.md to match.
Pending lead-dev decision D1; this commit can be dropped on its own. Add _Package_Verify_NuGet, run by Package after the pack and available alone as Package.Verify. It opens each produced .nupkg and asserts its version, and that every dependency group of both door packages pins Ably.PubSub.Core as exactly [x.y.z]. PackagingSpecs checks the source nuspecs, but whether $version$ is substituted inside the dependency's version attribute is a property of the packer. A loose packed pin (x.y.z, a minimum) still passes the package-install test, because restoring from the local source resolves the same version, so nothing else catches it before the packages are published.
Pending lead-dev decision D2; this commit can be dropped on its own. Package stamps src/CommonAssemblyInfo.cs with whatever version it is given, so a dispatch with the wrong version would pack binaries that match neither the release commit nor the Unity plugin. Before packing, fail unless the input equals the three assembly version attributes in src/CommonAssemblyInfo.cs (numeric part for AssemblyVersion and AssemblyFileVersion), unity/Assets/Ably/version.txt and the ProductVersion of the committed Unity plugin.
Replace the publish.yml dispatch steps and the Trusted Publishing setup with the manual process: bump the version files, regenerate the Unity plugin after the bump, update the CHANGELOG, merge the release PR, dispatch package.yml, download output-package, verify the packages locally (version, exact core pin in every door group, lib/<tfm> contents, strong-name token, the package-install test, README), then push Ably.PubSub.Core alone, wait until nuget.org has indexed it, push the device and server packages, and tag and release on GitHub. Add the prerequisites, a nuget.org API key note and a release checklist. The section is written on top of the docs refresh's wording of the unchanged parts, so merging both only conflicts inside this section.
|
Caution Review failedThe pull request is closed.
|
| Layer / File(s) | Summary |
|---|---|
Shared package contract and verification cake-build/tasks/package.cake, cake-build/tasks/package-consumption.cake, src/Ably.PubSub.Tests.DotNET/PubSub/PackagingSpecs.cs, nuget/*.nuspec, cake-build/README.md |
Cake packaging now requires a version and verifies package versions and exact Core dependency pins. Package-consumption checks use shared package helpers. Comments and documentation describe the package checks. |
Manual artifact packaging workflow .github/workflows/package.yml, .github/workflows/run-tests-windows-netframework.yml, .github/workflows/features.yml, package-unity.sh, package.cmd, cake-build/README.md |
The manual workflow checks the version, builds NuGet and Unity artifacts, and combines and validates them. The Windows .NET Framework workflow tests package installation. The packaging scripts fail when no version is supplied. |
Remove automated publishing and document manual release steps .github/workflows/publish.yml, .github/workflows/release-dry-run.yml, cake-build/tasks/release.cake, cake-build/build.cake, cake-build/tasks/build.cake, cake-build/helpers/paths.cake, CONTRIBUTING.md, cake-build/README.md |
The publish and dry-run workflows and release Cake tasks are removed. The release instructions describe manual package publication and release steps. |
Estimated code review effort: 4 (Complex) | ~45 minutes
Change: Other
Sequence Diagram(s)
sequenceDiagram
actor Maintainer
participant PackageWorkflow as package.yml
participant WindowsJob as Windows packaging job
participant UbuntuJob as Ubuntu packaging job
participant MergeJob as Merge job
Maintainer->>PackageWorkflow: Dispatch with version
PackageWorkflow->>WindowsJob: Check version, package NuGet, run install tests
PackageWorkflow->>UbuntuJob: Package Unity assets
WindowsJob->>MergeJob: Upload NuGet artifacts
UbuntuJob->>MergeJob: Upload Unity artifact
MergeJob->>Maintainer: Upload combined artifact
Possibly related PRs
- ably/ably-pubsub-dotnet#1373: This change updates package-consumption task inputs and workflow use introduced by that PR.
- ably/ably-pubsub-dotnet#1372: This change replaces the release instructions in
CONTRIBUTING.mdthat PR updated.
Suggested reviewers: umair-ably, ttypic
Merge Risk: 
Moderate · up to 98f5a
-
Packages may come from an unintended commit, and the release tag may point elsewhere. Verify and tag the packaged commit before release.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files. (12 skipped: 12 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the version bright
Then packs the goods and pins them right
NuGet and Unity travel near
Their hashes make the bundle clear
Manual steps complete the flight
Resolve the CONTRIBUTING.md conflict in the release section: keep the manual release runbook in place of the publish.yml steps. Everything above the release section comes from integration/v2 unchanged.
|
Future release automation (re-introducing automated NuGet publishing) is tracked in #1377. |
Shorten the CONTRIBUTING.md release process to the 1.x numbered-step style, remove the GitHub Codespaces note from it, and document the --packageOutput argument in cake-build/README.md.
89ec192 to
98f5aac
Compare
Summary
This goes back to the 1.x release model, as the lead dev decided. CI packs the packages and uploads them as workflow artifacts. The release engineer then downloads them, checks them, and pushes them to nuget.org by hand, in dependency order.
The automated
publish.yml(Trusted Publishing,releaseenvironment, dry-run dispatch) has never run and was never set up on nuget.org or in the repo settings, so there is nothing to undo outside the repo.What's removed
.github/workflows/publish.ymland.github/workflows/release-dry-run.yml.cake-build/tasks/release.cake, and with it every release-only target and task:Release.Preflight,Release.VerifyPackages,_Release_Preflight,_Release_Verify_Filesand_Release_Verify_Packages._VersionandPackageno longer depend on them.cake-build/README.md, and thepublish.yml/ Trusted Publishing text inCONTRIBUTING.md.What's restored or changed
.github/workflows/package.yml("Package ably"), restored frommainand adapted to the 2.0 packages. It keeps the file name, theversioninput, the pinned action SHAs andcontents: read. Becausemainstill has its 1.x copy, it can be dispatched againstintegration/v2before PR 1340 merges.package-library(windows-2022, needed for thenet46heads):./package.cmd $VERSION, then the package-install test (Test.PackageConsumption.NoPack) on the packed files, with the .NET Framework apps on the .NET Framework CLR. Uploadsably-package.package-unity(ubuntu-22.04, unchanged frommain):./package-unity.sh $VERSION. Uploadsably-unity-package, and now fails if no.unitypackagewas produced.merge-artifacts:output-packagemust hold exactlyAbly.PubSub.{Core,Device,Server}.$VERSION.nupkgandably.pubsub.$VERSION.unitypackage, and the job prints their SHA-256 values.package-pushjob, which built packages 2.0 no longer has.The package-install test still runs on every PR:
Test.PackageConsumptionis now the last step of "Unit and Integration Test: Windows (NetFramework)". It packs at the committed version, and the .NET Framework apps run on the .NET Framework CLR. This replaces the per-PR packaging run thatrelease-dry-run.ymldid.Cake:
nugetPackageSet),NuspecDirectory()andPackageOutputDirectory(), which reads--packageOutput, moved fromrelease.caketopackage.cake._Package_Create_NuGetandpackage-consumption.cakenow use them.Packagenow fails without--version. Before, it would silently pack nothing once the pre-flight was gone.package.cmdandpackage-unity.shalso exit 1 without a version.Comments in the nuspecs,
paths.cake,build.cake,features.ymland thePackagingSpecssummary were updated to match. The "lockstep" wording about the versioning contract stays.Pending lead-dev decisions (separate, droppable commits)
_Package_Verify_NuGet, whichPackageruns after the pack (and which can be run alone asPackage.Verify). It asserts each package's packed version, and that every dependency group of both doors pinsAbly.PubSub.Coreas exactly[x.y.z].PackagingSpecsonly sees the source nuspecs, and a loose packed pin still passes the package-install test. I checked that locally: a package whose pin was loosened to2.0.0passed all 8 package-install cases, and D1 rejected it. If D1 is dropped, nothing checks the packed pin, and the nuspec andPackagingSpecscomments from the first commit, which point atCONTRIBUTING.mdfor that check, need rewording.versioninput equalssrc/CommonAssemblyInfo.cs(all three attributes),unity/Assets/Ably/version.txt, and the ProductVersion of the committed Unity plugin. Without it,_Versionsilently stamps whatever version it's given, as on 1.x.Each is one self-contained commit. Reverting either applies cleanly, and the
CONTRIBUTING.mdrelease steps don't depend on them.CONTRIBUTING.md release process
The release section is back to
main's short numbered steps. It changes only what's different for the 2.0 packages:PackageReferenceexamples.output-packageholdsAbly.PubSub.Core,Ably.PubSub.DeviceandAbly.PubSub.Server.nupkgfiles plusably.pubsub.<version>.unitypackage.Ably.PubSub.Corefirst.Ably.PubSub.DeviceandAbly.PubSub.Serverfollow once the core is listed on nuget.org, because they pin that exact version.The rest of the file is
integration/v2's, including the PR 1372 changes. This branch hasintegration/v2merged in (after PRs 1371 and 1372 landed). TheCONTRIBUTING.mdconflict was confined to the release section.Validation
./build.sh --target=Build.NetStandard: 0 warnings, 0 errors../build.sh --target=Test.NetStandard.Unit.WithRetry --framework=net6.0: 1474 tests; 1455 passed, 19 skipped, 0 failed. All 14PackagingSpecscases passed.Package --version=2.0.0 --packageOutput=<scratch>packs all three, and D1 passes.Test.PackageConsumption.NoPackagainst that output: 8/8.Test.PackageConsumption --packageOutput=consumption-packages): 8/8.Release.Preflightis now "target not found", andPackagewithout--versionfails.2.0.0and fails for2.0.1, with all five mismatches reported.actionlintand a YAML parse pass on every changed workflow.release.cake,publish.yml,release-dry-run,_Release_,Release.Preflight,dry_run,NUGET_USER,Trusted Publishingand the old helper names returns nothing. The remaininglockstephits are about the versioning contract.c5240420(every 3D item in the revert plan done or deferred with a reason). Theintegration/v2merge was checked against both parents at60b472d2(Build.NetStandard 0/0; net6.0 unit tests 1492 total, 1473 passed, 19 skipped, 0 failed). The review-thread fixes and the shortened release section were reviewed at their own heads.package.ymlagainst this branch. That's the first follow-up below.Follow-ups not in this PR
package.ymlagainst this branch once (gh workflow run package.yml --ref chore/revert-release-automation -f version=2.0.0), checkoutput-package, and, if D2 is kept, check that a wrong version fails.package.ymland the Windows (NetFramework) workflow, which supersedes the body's "Not added to run-tests-windows-netframework.yml".Summary by CodeRabbit