Skip to content

Automation#35

Merged
DJGosnell merged 8 commits intomasterfrom
automation
Feb 10, 2026
Merged

Automation#35
DJGosnell merged 8 commits intomasterfrom
automation

Conversation

@DJGosnell
Copy link
Member

@DJGosnell DJGosnell commented Feb 10, 2026

Automates the PDFium bindings update pipeline that was previously a manual process (run generator locally, commit, tag, push). Introduces a bi-weekly GitHub Action that detects new https://github.com/bblanchon/pdfium-binaries releases, generates C# bindings, and publishes to NuGet — fully hands-off.

What changed

New: .github/workflows/check-update.yml

  • Bi-weekly cron (1st and 15th of each month) + manual workflow_dispatch
  • Detects new upstream releases via GitHub API, compares against Directory.Build.props
  • Supports targeting a specific version via dispatch input (e.g. 134.0.6996.0)
  • Verifies bblanchon.PDFium.Win32 NuGet package exists before proceeding
  • Generates bindings, builds, tests, then commits + tags directly to master
  • Tag push triggers existing publish pipeline in dotnet.yml

Modified: .github/workflows/dotnet.yml

  • Bumped actions/checkout to v4, softprops/action-gh-release to v2
  • Replaced olegtarasov/get-tag action with inline GITHUB_REF parsing
  • Replaced download_package.sh with direct generator call using latest true so PR/branch builds always resolve the latest upstream version
  • Limited push trigger to master only to prevent double-triggering on PRs

Modified: src/PDFiumCoreBindingsGenerator/PDFiumCoreLibrary.cs

  • Gated SetupMSVC() behind RuntimeInformation.IsOSPlatform(OSPlatform.Windows) so CppSharp runs on Ubuntu runners using its bundled clang headers

Pipeline flow

Cron/Dispatch → Detect new version → Verify NuGet exists → Generate bindings
→ Build + Test → Commit to master → Tag → dotnet.yml publishes to NuGet

Test plan

  • Trigger check-update.yml via workflow_dispatch with force_update: true to validate full pipeline
  • Verify CppSharp generates identical bindings on Ubuntu vs Windows (diff should only show timestamp)
  • Confirm dotnet.yml triggers exactly once on PR (no double runs)
  • End-to-end: verify tag push produces a GitHub release and NuGet package

DJGosnell and others added 8 commits February 10, 2026 12:00
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Runs on the 1st and 15th of each month. Detects new
bblanchon/pdfium-binaries releases via GitHub API, generates
bindings, and opens a PR for review.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gate SetupMSVC behind RuntimeInformation.IsOSPlatform check so
the generator runs on Linux using CppSharp's bundled clang headers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Bump actions/checkout to v4, softprops/action-gh-release to v2
- Replace olegtarasov/get-tag with inline GITHUB_REF parsing
- Add auto-tag job: creates version tag on master when an
  automated PDFium update PR is merged, triggering NuGet publish

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a runtime guard that aborts with an error if GITHUB_REF_NAME is not master, as defense-in-depth alongside the job-level if.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
check-update.yml:
- Support specific version input via workflow_dispatch
- Verify bblanchon.PDFium.Win32 exists on NuGet before proceeding
- Commit directly to master and tag instead of creating a PR
- Checkout pinned to master ref

dotnet.yml:
- Remove auto-tag job (cron handles tagging)
- Replace download_package.sh with direct generator call using 'latest'

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Limit push trigger to master only (PR trigger handles branches)
- Call generator with 'latest true' so Directory.Build.props and
  NuGet package references resolve to the latest bblanchon release

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@DJGosnell DJGosnell merged commit 3598758 into master Feb 10, 2026
1 check passed
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