Skip to content

ci: mirror release build steps in PR workflow and enforce nuget-license errors#10

Merged
XeroxDev merged 4 commits intomainfrom
codex/fix-and-validate-third-party-license-generation
Jan 16, 2026
Merged

ci: mirror release build steps in PR workflow and enforce nuget-license errors#10
XeroxDev merged 4 commits intomainfrom
codex/fix-and-validate-third-party-license-generation

Conversation

@XeroxDev
Copy link
Owner

Motivation

  • Make the PR build exercise the same publish semantics as the release release-build job so PR checks are more likely to surface release-time publish issues.
  • Ensure third-party license artefacts are generated reliably during Release builds and that nuget-license failures are not silently ignored.
  • Include generated license files in publish output so the app can read licenses at runtime.

Description

  • Update .github/workflows/pr-build.yml to add OS, APP_NAME, ARCH, RELEASE_NOTES_FILE, VPK_OUTPUT_DIR, VPK_PACK_AUTHORS, and VPK_PACK_TITLE environment variables and to add the Prepare build env, Set dynamic VPK env vars, .NET setup, and NuGet cache steps so the PR job mirrors the release build up through publish while remaining single-arch.
  • Change the PR publish step to run dotnet publish with -p:PublishProfile=${{ env.VPK_CHANNEL }} so the same publish profile computation is used as in release.
  • In YouTubeMusicStreamer.csproj add a <MakeDir> to ensure Resources\Raw\ThirdPartyLicenses exists before generation and run dotnet tool restore then dotnet tool run nuget-license while capturing its exit code into NuGetLicenseExitCode.
  • Emit a Warning when NuGetLicenseExitCode == 3 and an Error for any exit code other than 0 or 3, and add MauiAsset items for Resources\Raw\third-party-licenses.json and Resources\Raw\ThirdPartyLicenses\** with CopyToOutputDirectory=Always so generated license files are packaged.

Testing

  • No automated tests were run because these are workflow and build-target changes that require GitHub Actions (Windows) to validate; CI will run on PRs against main and verify the updated steps and publish behavior.

Codex Task

Copilot AI review requested due to automatic review settings January 16, 2026 17:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aligns the PR build workflow with the release build process to catch publish issues earlier, and ensures third-party license generation is reliable by treating nuget-license failures as build errors.

Changes:

  • Added environment variables and build preparation steps to .github/workflows/pr-build.yml to mirror the release workflow
  • Modified the publish command to use the same publish profile resolution as the release build
  • Enhanced YouTubeMusicStreamer.csproj to create the license output directory, capture nuget-license exit codes, emit warnings/errors based on exit status, and include generated license files in the build output

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/pr-build.yml Added environment variables and build preparation steps to match release workflow; updated publish command to use computed publish profile
YouTubeMusicStreamer/YouTubeMusicStreamer.csproj Added directory creation for license output, exit code handling for nuget-license, and configured license files as MAUI assets with copy-to-output

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@XeroxDev XeroxDev merged commit fe0d099 into main Jan 16, 2026
1 check failed
@XeroxDev XeroxDev deleted the codex/fix-and-validate-third-party-license-generation branch January 16, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant