From 8ce10b099651c3b88b0a4c18d4bf1745c8bf026b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Jan 2026 20:45:20 +0000 Subject: [PATCH 1/5] Initial plan From 457a91d61ae01f7224e8b7592c9da3d1e9b56257 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Jan 2026 20:47:41 +0000 Subject: [PATCH 2/5] Add GitHub Actions workflows for build/test and NuGet packaging Co-authored-by: brflynn <49290318+brflynn@users.noreply.github.com> --- .github/workflows/pull-request.yml | 32 ++++++++++++++++++++++++++ .github/workflows/release.yml | 37 ++++++++++++++++++++++++++++++ SearchPlatAPI.nuspec | 20 ++++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 .github/workflows/pull-request.yml create mode 100644 .github/workflows/release.yml create mode 100644 SearchPlatAPI.nuspec diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..e605f2e --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,32 @@ +name: Build and Test PR + +on: + pull_request: + branches: + - main + +jobs: + build-and-test: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Setup NuGet + uses: NuGet/setup-nuget@v2 + + - name: Restore NuGet packages + run: nuget restore src\SearchPlatAPI.sln + + - name: Build solution + run: msbuild src\SearchPlatAPI.sln /p:Configuration=Release /p:Platform=x64 + + - name: Setup VSTest + uses: darenm/Setup-VSTest@v1.3 + + - name: Run tests + run: vstest.console.exe src\x64\Release\test.dll diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..6ad5717 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: Release to NuGet + +on: + push: + branches: + - release + +jobs: + package-and-publish: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup NuGet + uses: NuGet/setup-nuget@v2 + + - name: Get version from nuspec + id: get_version + shell: pwsh + run: | + [xml]$nuspec = Get-Content SearchPlatAPI.nuspec + $version = $nuspec.package.metadata.version + echo "version=$version" >> $env:GITHUB_OUTPUT + + - name: Pack NuGet package + run: nuget pack SearchPlatAPI.nuspec -Version ${{ steps.get_version.outputs.version }} + + - name: Push to NuGet + run: nuget push *.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_API_KEY }} -SkipDuplicate + + - name: Upload package as artifact + uses: actions/upload-artifact@v4 + with: + name: nuget-package + path: '*.nupkg' diff --git a/SearchPlatAPI.nuspec b/SearchPlatAPI.nuspec new file mode 100644 index 0000000..c742563 --- /dev/null +++ b/SearchPlatAPI.nuspec @@ -0,0 +1,20 @@ + + + + SearchPlatAPI + 1.0.0 + SearchPlatAPI Contributors + SearchPlatAPI + false + LICENSE + https://github.com/brflynn/searchplatapi + Public Wrappers for Common Windows Search Service Platform APIs. These APIs assist developers in programming against the Windows Search Service in a much easier fashion than today. + Initial release of SearchPlatAPI header files. + Copyright (c) SearchPlatAPI Contributors + windows search native cpp headers + + + + + + From fa793ec6f041184142bf397c39d1f6c7c282b88f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Jan 2026 20:48:09 +0000 Subject: [PATCH 3/5] Update README with GitHub Actions workflow documentation Co-authored-by: brflynn <49290318+brflynn@users.noreply.github.com> --- README.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4c4c0a7..f401d71 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,28 @@ # Windows Search Platform APIs Public Wrappers for Common Windows Search Service Platform APIs -These APIs assist developers in programming against the Windows Search Service in a much easier fashion than today. APIs are pretty verbose, and spread across many different header files. This takes the most commonly used functionality and puts it in a simple to use header file for Win32 application developers. +These APIs assist developers in programming against the Windows Search Service in a much easier fashion than today. APIs are pretty verbose, and spread across many different header files. This takes the most commonly used functionality and puts it in a simple to use header file for Win32 application developers. + +## CI/CD Workflows + +This repository includes two GitHub Actions workflows: + +### Pull Request Workflow +- **Trigger**: Pull requests to the `main` branch +- **Purpose**: Builds the solution and runs tests to ensure code quality +- **Steps**: + - Restores NuGet packages + - Builds the solution using MSBuild (Release x64) + - Runs unit tests with VSTest + +### Release Workflow +- **Trigger**: Pushes to the `release` branch +- **Purpose**: Packages header files and publishes to NuGet +- **Steps**: + - Packages all header files from `src/api/` into a NuGet package + - Publishes to NuGet.org (requires `NUGET_API_KEY` secret) + - Uploads package as a build artifact + +## NuGet Package + +The header files are published as a NuGet package for easy consumption in C++ projects. The package includes all API headers from the `src/api/` directory. From 87d7e21e94a898108421081e35bb89215ac78665 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Jan 2026 20:49:27 +0000 Subject: [PATCH 4/5] Fix GitHub Actions to use official NuGet action and built-in VSTest Co-authored-by: brflynn <49290318+brflynn@users.noreply.github.com> --- .github/workflows/pull-request.yml | 5 +---- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index e605f2e..4e4f015 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -17,7 +17,7 @@ jobs: uses: microsoft/setup-msbuild@v2 - name: Setup NuGet - uses: NuGet/setup-nuget@v2 + uses: nuget/setup-nuget@v2.0.0 - name: Restore NuGet packages run: nuget restore src\SearchPlatAPI.sln @@ -25,8 +25,5 @@ jobs: - name: Build solution run: msbuild src\SearchPlatAPI.sln /p:Configuration=Release /p:Platform=x64 - - name: Setup VSTest - uses: darenm/Setup-VSTest@v1.3 - - name: Run tests run: vstest.console.exe src\x64\Release\test.dll diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6ad5717..684f47f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v4 - name: Setup NuGet - uses: NuGet/setup-nuget@v2 + uses: nuget/setup-nuget@v2.0.0 - name: Get version from nuspec id: get_version From 6b606b202ddf25810e73f15eefbae88bb303b639 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Jan 2026 20:50:36 +0000 Subject: [PATCH 5/5] Add explicit permissions to workflows for security Co-authored-by: brflynn <49290318+brflynn@users.noreply.github.com> --- .github/workflows/pull-request.yml | 2 ++ .github/workflows/release.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 4e4f015..b4889fb 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -8,6 +8,8 @@ on: jobs: build-and-test: runs-on: windows-latest + permissions: + contents: read steps: - name: Checkout code diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 684f47f..320d8fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,8 @@ on: jobs: package-and-publish: runs-on: windows-latest + permissions: + contents: read steps: - name: Checkout code