Skip to content

PDFStream.NET 1.0.0-rc.2: nuget.org page and keyless publishing - #2

Open
glenntosco wants to merge 8 commits into
mainfrom
release/1.0.0-rc.2
Open

glenntosco wants to merge 8 commits into
mainfrom
release/1.0.0-rc.2

Conversation

@glenntosco

Copy link
Copy Markdown
Contributor

PDFStream.NET 1.0.0-rc.2: a proper nuget.org page, and keyless publishing

1.0.0-rc.1 is live on nuget.org but its page is bland: no icon, a readme written for GitHub, a thin description. NuGet versions are permanent and an icon or metadata cannot be added to an existing version, so the new page ships as 1.0.0-rc.2. The library code is unchanged from rc.1.

What this adds

  • Icon (src/PDFStream.NET/icon.png, 256 px) with the script that draws it (tools/make-icon.ps1), so it can be regenerated. It reads clearly down to 32 px on light and dark backgrounds.
  • A readme written for nuget.org (src/PDFStream.NET/README.nuget.md, packed as the package readme): pitch, badges, features table, two code samples that compile, install, requirements, a plain status section (what is verified, what is reported only, what is not verified), security and limits, links. The GitHub README stays separate.
  • Metadata: a fuller description, search tags, release notes, copyright, icon.
  • Keyless publishing: .github/workflows/publish.yml uses NuGet Trusted Publishing (GitHub OIDC), so there is no long-lived API key. It starts only by hand, refuses to run from any branch but main, needs approval on the release environment, builds, tests and checks the package, then pushes. Actions are pinned to full commit SHAs (checked against their release tags). The package check is now one shared script used by CI and by the publish workflow.
  • Docs: README, SECURITY.md and CONTRIBUTING.md now say rc.1 is published; CONTRIBUTING has a "Releasing" section with the one-time setup.

Verified

  • net8 452/452 and net10 477/477 (x64), 0 warnings as errors; the package check passes on the rc.2 package and fails on 5 deliberately broken packages; a separate app using the rc.2 package printed a page; both readme samples compile; the readme renders through GitHub's markdown renderer.

Not verified

  • The real nuget.org page rendering (it can only be seen after publishing).
  • The NuGet login and push steps of the publish workflow: they need the nuget.org Trusted Publishing policy, the release environment and the NUGET_USER secret, which are not set up yet.
  • Everything listed as not verified in the readme's Status section (Arm64, scheduled task, IIS, other printers).

Before publishing rc.2

Merge this PR, set up the policy, environment and secret (see CONTRIBUTING.md, "Releasing"), then run the "Publish to NuGet" workflow from the Actions tab on main.

tools/make-icon.ps1 draws src/PDFStream.NET/icon.png (256 x 256) with PowerShell 7 and
System.Drawing: a P4 Blue tile, a white PDF page with an orange folded corner and two
downward chevrons, and a printer with the printed sheet coming out. Flat brand colours,
no text, no third-party artwork, drawn at 4x and reduced with bicubic filtering, and
large enough shapes to read at 32 px. Running the script twice gives the same file.
README.nuget.md is the nuget.org package page: pitch, badges, why, features, a quick
start, a stream/page range/duplex example, install, requirements, an honest status box,
security and limits, and links. No HTML, only absolute https links, images only from
shields.io. Both C# samples compile unchanged against the public API.
… tags

The package now carries icon.png (PackageIcon) and README.nuget.md packed as README.md;
the repository README.md is the GitHub page and is no longer packed. The description
leads with silent PDF printing on Windows for services and servers, the tags cover the
words people search for, and PackageReleaseNotes links to the changelog. The two files
are removed from the default None glob and included once, because the outer build of a
multi-targeted pack does not see the glob.
…eadme

1.0.0-rc.2 carries the new package page; a version on nuget.org can never be edited,
so the page needs a new version. The package check moves out of ci.yml into
.github/scripts/check-package.ps1, the one place that pins the version, and now also
requires icon.png with <icon>icon.png</icon> in the nuspec (a square PNG, 128 px to
1 MB), release notes, and that README.md is the package readme: no raw HTML, only
absolute https links and images, and the install command for this version.
README, SECURITY and CONTRIBUTING no longer say the package is unpublished: 1.0.0-rc.1
was published on nuget.org on 2026-11-21, and 1.0.0-rc.2 carries the new package page
with no library code change. The README gets a NuGet badge and the prerelease install
commands. The changelog gets the 1.0.0-rc.2 section with what was run. The release
checklist records the releases so far and one reported print through an installed
print service, with every manual row still Not run and no initials.
publish.yml ("Publish to NuGet") publishes with NuGet Trusted Publishing, so no API key
is stored anywhere. It runs only when started by hand and only from main (a first job
refuses any other branch with a plain message before anything is approved), in the
release environment that needs a reviewer's approval, with contents: read and
id-token: write granted to the publish job only. It builds with warnings as errors,
runs both test suites, packs, runs the same package-check script as CI, uploads the
package, then gets a one-hour key from NuGet/login and pushes with --skip-duplicate.
Actions are pinned to full commit SHAs, checked against their GitHub releases.
CONTRIBUTING.md gets a Releasing section: the one-time Trusted Publishing set-up on
nuget.org and GitHub (policy, release environment with a reviewer, NUGET_USER secret)
and the steps of each release. The 1.0.0-rc.2 changelog lists the publish workflow and
says it has not run yet.
In the package readme the single reported print through an installed print service
gets its own "Reported, not verified" line instead of sitting under "Verified", and the
"No dialog ever opens" line is dropped (Microsoft Print to PDF needs OutputFile to skip
its Save As dialog). The usage guide's install line adds --prerelease, which nuget.org
needs while only prereleases exist. The changelog records that the published rc.1 was
built from e8cf1df, with no C# change since.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant