From 3bc0a81beb9e781416f1ff1f86bce10ffd39db8a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 13:17:30 +0000 Subject: [PATCH 01/10] Bump actions/checkout from 5 to 6 Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/dotnet.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 6afeebdf..4947fc55 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -13,7 +13,7 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Setup .NET uses: actions/setup-dotnet@v5 with: @@ -38,7 +38,7 @@ jobs: runs-on: ubuntu-latest needs: build steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Setup .NET uses: actions/setup-dotnet@v5 with: @@ -68,7 +68,7 @@ jobs: runs-on: ubuntu-latest needs: build steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Setup .NET uses: actions/setup-dotnet@v5 with: From 6eee396fc1929cd667abeb4c8abb42878d1e5b29 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 13:26:02 +0000 Subject: [PATCH 02/10] Bump Codeuctivity.SkiaSharpCompare from 3.1.214 to 3.2.245 --- updated-dependencies: - dependency-name: Codeuctivity.SkiaSharpCompare dependency-version: 3.2.245 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- OpenXmlPowerTools.Tests/OpenXmlPowerTools.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenXmlPowerTools.Tests/OpenXmlPowerTools.Tests.csproj b/OpenXmlPowerTools.Tests/OpenXmlPowerTools.Tests.csproj index 414e9273..66430a32 100644 --- a/OpenXmlPowerTools.Tests/OpenXmlPowerTools.Tests.csproj +++ b/OpenXmlPowerTools.Tests/OpenXmlPowerTools.Tests.csproj @@ -7,7 +7,7 @@ - + all From aeaaa96026d627a08c5b3b3fc892ad74f6f82f1b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Dec 2025 13:26:54 +0000 Subject: [PATCH 03/10] Bump System.Configuration.ConfigurationManager from 10.0.0 to 10.0.1 --- updated-dependencies: - dependency-name: System.Configuration.ConfigurationManager dependency-version: 10.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .../MarkupSimplifierApp/MarkupSimplifierApp.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenXmlPowerToolsExamples/MarkupSimplifierApp/MarkupSimplifierApp.csproj b/OpenXmlPowerToolsExamples/MarkupSimplifierApp/MarkupSimplifierApp.csproj index 2378dfaa..c9e62b42 100644 --- a/OpenXmlPowerToolsExamples/MarkupSimplifierApp/MarkupSimplifierApp.csproj +++ b/OpenXmlPowerToolsExamples/MarkupSimplifierApp/MarkupSimplifierApp.csproj @@ -9,7 +9,7 @@ - + From 389410b5c1459d2637b25c4d3017936ec4681818 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 13:03:35 +0000 Subject: [PATCH 04/10] Bump actions/upload-artifact from 5 to 6 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 4947fc55..f33679db 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -27,7 +27,7 @@ jobs: - name: Test run: dotnet test --no-build --verbosity normal --configuration Release --logger "trx;LogFileName=${{ runner.workspace }}/OpenXmlPowerTools/TestResult/test_results.trx" - name: Publish Unit Test Results - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v6 if: failure() with: name: TestResult From 1b34980c5375cb24610663b9ab20a3a3bde3fe9e Mon Sep 17 00:00:00 2001 From: Lowell Stewart Date: Sat, 3 Jan 2026 15:16:30 -0700 Subject: [PATCH 05/10] When removing smart tags, also remove smart tag properties (if present) --- .../MarkupSimplifierTests.cs | 16 ++++++++++++--- OpenXmlPowerTools/MarkupSimplifier.cs | 20 ++++++++++++------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/OpenXmlPowerTools.Tests/MarkupSimplifierTests.cs b/OpenXmlPowerTools.Tests/MarkupSimplifierTests.cs index 5bc7ab7b..71408483 100644 --- a/OpenXmlPowerTools.Tests/MarkupSimplifierTests.cs +++ b/OpenXmlPowerTools.Tests/MarkupSimplifierTests.cs @@ -12,8 +12,7 @@ public class MarkupSimplifierTests { private const WordprocessingDocumentType DocumentType = WordprocessingDocumentType.Document; - private const string SmartTagDocumentTextValue = "The countries include Algeria, Botswana, and Sri Lanka."; - + private const string SmartTagDocumentTextValue = "The countries include Algeria, Botswana, and Sri Lanka. This is privileged information!"; private const string SmartTagDocumentXmlString = @" @@ -45,7 +44,18 @@ public class MarkupSimplifierTests - . + . This is + + + + + + + privileged + + + + information! diff --git a/OpenXmlPowerTools/MarkupSimplifier.cs b/OpenXmlPowerTools/MarkupSimplifier.cs index 1240e78b..a6f4dabb 100644 --- a/OpenXmlPowerTools/MarkupSimplifier.cs +++ b/OpenXmlPowerTools/MarkupSimplifier.cs @@ -191,14 +191,20 @@ private static object RemoveCustomXmlAndContentControlsTransform( { if (node is XElement element) { - if (simplifyMarkupSettings.RemoveSmartTags && - element.Name == W.smartTag) + if (simplifyMarkupSettings.RemoveSmartTags) { - return element - .Elements() - .Select(e => - RemoveCustomXmlAndContentControlsTransform(e, - simplifyMarkupSettings)); + if (element.Name == W.smartTag) + { + return element + .Elements() + .Select(e => + RemoveCustomXmlAndContentControlsTransform(e, + simplifyMarkupSettings)); + } + if (element.Name == W.smartTagPr) + { + return null; + } } if (simplifyMarkupSettings.RemoveContentControls && From b4067a3cd84a8c5bdeaa29e0a272529d0fa8ce2e Mon Sep 17 00:00:00 2001 From: Stefan Seeland <168659+stesee@users.noreply.github.com> Date: Tue, 6 Jan 2026 10:48:06 +0100 Subject: [PATCH 06/10] Refactor GitHub Actions workflow for .NET --- .github/workflows/dotnet.yml | 127 ++++++++++++++++++----------------- 1 file changed, 64 insertions(+), 63 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index f33679db..ff1bdb56 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -5,6 +5,7 @@ env: on: push: + pull_request: jobs: build: @@ -13,84 +14,84 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] steps: - - uses: actions/checkout@v6 - - name: Setup .NET - uses: actions/setup-dotnet@v5 - with: - dotnet-version: | - 8.0.x - 10.0.x - - name: Restore dependencies - run: dotnet restore - - name: Build - run: dotnet build --configuration Release --no-restore - - name: Test - run: dotnet test --no-build --verbosity normal --configuration Release --logger "trx;LogFileName=${{ runner.workspace }}/OpenXmlPowerTools/TestResult/test_results.trx" - - name: Publish Unit Test Results - uses: actions/upload-artifact@v6 - if: failure() - with: - name: TestResult - path: "TestResult/**/*" + - uses: actions/checkout@v6 + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: | + 8.0.x + 10.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore + - name: Test + run: dotnet test --no-build --verbosity normal --configuration Release --logger "trx;LogFileName=${{ runner.workspace }}/OpenXmlPowerTools/TestResult/test_results.trx" + - name: Publish Unit Test Results + uses: actions/upload-artifact@v6 + if: failure() + with: + name: TestResult + path: "TestResult/**/*" deployRelease: if: github.ref == 'refs/heads/release' runs-on: ubuntu-latest - needs: build + needs: build steps: - - uses: actions/checkout@v6 - - name: Setup .NET - uses: actions/setup-dotnet@v5 - with: - dotnet-version: | - 8.0.x - 10.0.x - - name: Restore dependencies - run: dotnet restore - - name: Build - run: dotnet build --configuration Release --no-restore - - name: NugetPush - env: + - uses: actions/checkout@v6 + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: | + 8.0.x + 10.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore + - name: NugetPush + env: NUGET_TOKEN_EXISTS: ${{ secrets.NUGET_TOKEN }} - if: env.NUGET_TOKEN_EXISTS != '' - run: | + if: env.NUGET_TOKEN_EXISTS != '' + run: | dotnet nuget push ./OpenXmlPowerTools/bin/Release/*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TOKEN}} --source https://api.nuget.org/v3/index.json - - name: Github Release - shell: bash - env: - GITHUB_TOKEN: ${{ github.TOKEN }} - if: env.GITHUB_TOKEN != '' - run: | + - name: Github Release + shell: bash + env: + GITHUB_TOKEN: ${{ github.TOKEN }} + if: env.GITHUB_TOKEN != '' + run: | gh release create ${{env.CURRENT_VERSION}} ./OpenXmlPowerTools/bin/Release/*.*nupkg --generate-notes deployTest: if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest - needs: build + needs: build steps: - - uses: actions/checkout@v6 - - name: Setup .NET - uses: actions/setup-dotnet@v5 - with: - dotnet-version: | - 8.0.x - 10.0.x - - name: Restore dependencies - run: dotnet restore - - name: Build - run: dotnet build --configuration Release --no-restore - - name: NugetPush - env: + - uses: actions/checkout@v6 + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: | + 8.0.x + 10.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --configuration Release --no-restore + - name: NugetPush + env: NUGET_TOKEN_EXISTS: ${{ secrets.NUGET_TEST_TOKEN }} - if: env.NUGET_TOKEN_EXISTS != '' - run: | + if: env.NUGET_TOKEN_EXISTS != '' + run: | ls ./OpenXmlPowerTools/bin/Release dotnet nuget push ./OpenXmlPowerTools/bin/Release/*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TEST_TOKEN}} --source https://apiint.nugettest.org/v3/index.json - - name: Github Prerelease - shell: bash - env: - GITHUB_TOKEN: ${{ github.TOKEN }} - if: env.GITHUB_TOKEN != '' - run: | + - name: Github Prerelease + shell: bash + env: + GITHUB_TOKEN: ${{ github.TOKEN }} + if: env.GITHUB_TOKEN != '' + run: | gh release create ${{env.CURRENT_VERSION}} ./OpenXmlPowerTools/bin/Release/*.*nupkg --prerelease --generate-notes From 461cc86bfb2e57622d8cbf6388a654d97e55df43 Mon Sep 17 00:00:00 2001 From: Stefan Seeland <168659+stesee@users.noreply.github.com> Date: Tue, 6 Jan 2026 11:04:40 +0100 Subject: [PATCH 07/10] Optimize build workflow and artifact handling Adds conditional job execution for push and pull requests from forks, uploads build artifacts only on Ubuntu, and refactors publish/test jobs to use downloaded artifacts instead of rebuilding. This streamlines CI/CD, reduces redundant builds, and improves artifact management. --- .github/workflows/dotnet.yml | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index ff1bdb56..1523f4ae 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -9,6 +9,9 @@ on: jobs: build: + if: | + github.event_name == 'push' || + (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) runs-on: ${{ matrix.os }} strategy: matrix: @@ -27,6 +30,13 @@ jobs: run: dotnet build --configuration Release --no-restore - name: Test run: dotnet test --no-build --verbosity normal --configuration Release --logger "trx;LogFileName=${{ runner.workspace }}/OpenXmlPowerTools/TestResult/test_results.trx" + - name: Upload build artifacts + uses: actions/upload-artifact@v6 + if: matrix.os == 'ubuntu-latest' + with: + name: build-artifacts + path: | + OpenXmlPowerTools/bin/Release/ - name: Publish Unit Test Results uses: actions/upload-artifact@v6 if: failure() @@ -40,16 +50,10 @@ jobs: needs: build steps: - uses: actions/checkout@v6 - - name: Setup .NET - uses: actions/setup-dotnet@v5 + - name: Download build artifacts + uses: actions/download-artifact@v6 with: - dotnet-version: | - 8.0.x - 10.0.x - - name: Restore dependencies - run: dotnet restore - - name: Build - run: dotnet build --configuration Release --no-restore + name: build-artifacts - name: NugetPush env: NUGET_TOKEN_EXISTS: ${{ secrets.NUGET_TOKEN }} @@ -70,16 +74,10 @@ jobs: needs: build steps: - uses: actions/checkout@v6 - - name: Setup .NET - uses: actions/setup-dotnet@v5 + - name: Download build artifacts + uses: actions/download-artifact@v6 with: - dotnet-version: | - 8.0.x - 10.0.x - - name: Restore dependencies - run: dotnet restore - - name: Build - run: dotnet build --configuration Release --no-restore + name: build-artifacts - name: NugetPush env: NUGET_TOKEN_EXISTS: ${{ secrets.NUGET_TEST_TOKEN }} @@ -87,7 +85,6 @@ jobs: run: | ls ./OpenXmlPowerTools/bin/Release dotnet nuget push ./OpenXmlPowerTools/bin/Release/*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TEST_TOKEN}} --source https://apiint.nugettest.org/v3/index.json - - name: Github Prerelease shell: bash env: From 42b3c961a7737dd7a645fa06abc2cfdc5dbb1631 Mon Sep 17 00:00:00 2001 From: Stefan Seeland <168659+stesee@users.noreply.github.com> Date: Tue, 6 Jan 2026 12:04:01 +0100 Subject: [PATCH 08/10] Restrict deploy jobs to push events on main and release Updated the deployRelease and deployTest jobs in the GitHub Actions workflow to only run on push events to the 'release' and 'main' branches, respectively. This prevents deployments from being triggered by other event types. --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 1523f4ae..c2a4ec07 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -45,7 +45,7 @@ jobs: path: "TestResult/**/*" deployRelease: - if: github.ref == 'refs/heads/release' + if: github.event_name == 'push' && github.ref == 'refs/heads/release' runs-on: ubuntu-latest needs: build steps: @@ -69,7 +69,7 @@ jobs: gh release create ${{env.CURRENT_VERSION}} ./OpenXmlPowerTools/bin/Release/*.*nupkg --generate-notes deployTest: - if: github.ref == 'refs/heads/main' + if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest needs: build steps: From 45fc41f7589ee1c1233a8b6c4044fc860d9c87a4 Mon Sep 17 00:00:00 2001 From: Stefan Seeland <168659+stesee@users.noreply.github.com> Date: Tue, 6 Jan 2026 18:24:29 +0100 Subject: [PATCH 09/10] Simplify nuget push and release commands --- .github/workflows/dotnet.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index c2a4ec07..ac45ec18 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -59,14 +59,14 @@ jobs: NUGET_TOKEN_EXISTS: ${{ secrets.NUGET_TOKEN }} if: env.NUGET_TOKEN_EXISTS != '' run: | - dotnet nuget push ./OpenXmlPowerTools/bin/Release/*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TOKEN}} --source https://api.nuget.org/v3/index.json + dotnet nuget push *.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TOKEN}} --source https://api.nuget.org/v3/index.json - name: Github Release shell: bash env: GITHUB_TOKEN: ${{ github.TOKEN }} if: env.GITHUB_TOKEN != '' run: | - gh release create ${{env.CURRENT_VERSION}} ./OpenXmlPowerTools/bin/Release/*.*nupkg --generate-notes + gh release create ${{env.CURRENT_VERSION}} *.*nupkg --generate-notes deployTest: if: github.event_name == 'push' && github.ref == 'refs/heads/main' @@ -84,11 +84,11 @@ jobs: if: env.NUGET_TOKEN_EXISTS != '' run: | ls ./OpenXmlPowerTools/bin/Release - dotnet nuget push ./OpenXmlPowerTools/bin/Release/*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TEST_TOKEN}} --source https://apiint.nugettest.org/v3/index.json + dotnet nuget push *.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TEST_TOKEN}} --source https://apiint.nugettest.org/v3/index.json - name: Github Prerelease shell: bash env: GITHUB_TOKEN: ${{ github.TOKEN }} if: env.GITHUB_TOKEN != '' run: | - gh release create ${{env.CURRENT_VERSION}} ./OpenXmlPowerTools/bin/Release/*.*nupkg --prerelease --generate-notes + gh release create ${{env.CURRENT_VERSION}} *.*nupkg --prerelease --generate-notes From a0b53cf1426e3a5ecd63e1ba66a843703f1c9837 Mon Sep 17 00:00:00 2001 From: Stefan Seeland <168659+stesee@users.noreply.github.com> Date: Tue, 6 Jan 2026 19:54:36 +0100 Subject: [PATCH 10/10] Update nuget push command to list files --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index ac45ec18..def4e78c 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -83,7 +83,7 @@ jobs: NUGET_TOKEN_EXISTS: ${{ secrets.NUGET_TEST_TOKEN }} if: env.NUGET_TOKEN_EXISTS != '' run: | - ls ./OpenXmlPowerTools/bin/Release + ls dotnet nuget push *.nupkg --skip-duplicate --api-key ${{secrets.NUGET_TEST_TOKEN}} --source https://apiint.nugettest.org/v3/index.json - name: Github Prerelease shell: bash