From ea09670bfe821a7808ba93e2b4500ef4bfac589d Mon Sep 17 00:00:00 2001 From: David Boike Date: Thu, 9 Apr 2026 13:47:18 -0500 Subject: [PATCH 01/10] Build samples and Azure login --- .github/workflows/publish-samples.yml | 48 +++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/publish-samples.yml diff --git a/.github/workflows/publish-samples.yml b/.github/workflows/publish-samples.yml new file mode 100644 index 00000000000..26ee5c01671 --- /dev/null +++ b/.github/workflows/publish-samples.yml @@ -0,0 +1,48 @@ +name: Publish Samples +on: + pull_request: +env: + DOTNET_NOLOGO: true +permissions: + id-token: write +jobs: + publish-samples: + name: Publish Samples + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + - name: Setup .NET SDK + uses: actions/setup-dotnet@v5.2.0 + with: + global-json-file: global.json + # Caching is done to limit data transfer on each PR, not to optimize CI speed + - name: Check docstool version for cache + run: | + curl --connect-timeout 5 --max-time 15 --silent --show-error https://f.feedz.io/particular-software/packages/nuget/v3/packages/particular.docstool/index.json >> docstool-versions.json + - name: Cache docstool + id: cache-docstool + uses: actions/cache@v5.0.4 + with: + path: | + ~/.dotnet/tools/docstool + ~/.dotnet/tools/.store/particular.docstool + key: docstool-${{ hashFiles('docstool-versions.json') }} + - name: Install docstool + if: steps.cache-docstool.outputs.cache-hit != 'true' + run: dotnet tool install Particular.DocsTool --global --add-source https://f.feedz.io/particular-software/packages/nuget/index.json + - name: Run docstool + run: docstool test --no-version-check --zipfiles --out ~/build-output + - name: Upload Output + uses: actions/upload-artifact@v4 + with: + name: samples + path: ~/build-output + if-no-files-found: error + retention-days: 1 + - name: Azure Login + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZURE_OPENID_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_OPENID_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_OPENID_SUBSCRIPTION_ID }} From 06f0c76d289b4017436e61856bb021b3a669c33d Mon Sep 17 00:00:00 2001 From: David Boike Date: Thu, 9 Apr 2026 14:05:36 -0500 Subject: [PATCH 02/10] Attempt the upload --- .github/workflows/publish-samples.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-samples.yml b/.github/workflows/publish-samples.yml index 26ee5c01671..5e44d8a8ad5 100644 --- a/.github/workflows/publish-samples.yml +++ b/.github/workflows/publish-samples.yml @@ -34,15 +34,20 @@ jobs: - name: Run docstool run: docstool test --no-version-check --zipfiles --out ~/build-output - name: Upload Output - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: samples path: ~/build-output if-no-files-found: error retention-days: 1 - name: Azure Login - uses: azure/login@v2 + uses: azure/login@v3 with: client-id: ${{ secrets.AZURE_OPENID_CLIENT_ID }} tenant-id: ${{ secrets.AZURE_OPENID_TENANT_ID }} subscription-id: ${{ secrets.AZURE_OPENID_SUBSCRIPTION_ID }} + - name: Publish Samples + uses: azure/cli@v3 + with: + azcliversion: latest + inlineScript: az storage blob upload-batch --source ~/build-output --destination zips --account-name particulardocs --pattern "*.zip" --overwrite From 0f0808a96042109b46048c1d49f8aca7bcf67a0e Mon Sep 17 00:00:00 2001 From: David Boike Date: Thu, 9 Apr 2026 14:09:06 -0500 Subject: [PATCH 03/10] Didn't recognize PWD? --- .github/workflows/publish-samples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-samples.yml b/.github/workflows/publish-samples.yml index 5e44d8a8ad5..5fe39bd8839 100644 --- a/.github/workflows/publish-samples.yml +++ b/.github/workflows/publish-samples.yml @@ -50,4 +50,4 @@ jobs: uses: azure/cli@v3 with: azcliversion: latest - inlineScript: az storage blob upload-batch --source ~/build-output --destination zips --account-name particulardocs --pattern "*.zip" --overwrite + inlineScript: az storage blob upload-batch --source build-output --destination zips --account-name particulardocs --pattern "*.zip" --overwrite From e14faa9395cb907f44625046185ffae5632026b1 Mon Sep 17 00:00:00 2001 From: David Boike Date: Thu, 9 Apr 2026 14:40:19 -0500 Subject: [PATCH 04/10] Just use bash --- .github/workflows/publish-samples.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/publish-samples.yml b/.github/workflows/publish-samples.yml index 5fe39bd8839..004ef1459b3 100644 --- a/.github/workflows/publish-samples.yml +++ b/.github/workflows/publish-samples.yml @@ -47,7 +47,4 @@ jobs: tenant-id: ${{ secrets.AZURE_OPENID_TENANT_ID }} subscription-id: ${{ secrets.AZURE_OPENID_SUBSCRIPTION_ID }} - name: Publish Samples - uses: azure/cli@v3 - with: - azcliversion: latest - inlineScript: az storage blob upload-batch --source build-output --destination zips --account-name particulardocs --pattern "*.zip" --overwrite + run: az storage blob upload-batch --source ~/build-output --destination zips --account-name particulardocs --pattern "*.zip" --overwrite From c4b7b1d8d9332715af03c7dfa2fd5c990b43adab Mon Sep 17 00:00:00 2001 From: David Boike Date: Thu, 9 Apr 2026 14:42:45 -0500 Subject: [PATCH 05/10] Auth mode param --- .github/workflows/publish-samples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-samples.yml b/.github/workflows/publish-samples.yml index 004ef1459b3..6fcb2bc9caa 100644 --- a/.github/workflows/publish-samples.yml +++ b/.github/workflows/publish-samples.yml @@ -47,4 +47,4 @@ jobs: tenant-id: ${{ secrets.AZURE_OPENID_TENANT_ID }} subscription-id: ${{ secrets.AZURE_OPENID_SUBSCRIPTION_ID }} - name: Publish Samples - run: az storage blob upload-batch --source ~/build-output --destination zips --account-name particulardocs --pattern "*.zip" --overwrite + run: az storage blob upload-batch --source ~/build-output --destination zips --account-name particulardocs --pattern "*.zip" --overwrite --auth-mode login From 943dd0d83d8f86067025e24e6bc55af096468031 Mon Sep 17 00:00:00 2001 From: David Boike Date: Thu, 9 Apr 2026 14:48:23 -0500 Subject: [PATCH 06/10] No progress, formatting, test overwrite --- .github/workflows/publish-samples.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-samples.yml b/.github/workflows/publish-samples.yml index 6fcb2bc9caa..45d156dd744 100644 --- a/.github/workflows/publish-samples.yml +++ b/.github/workflows/publish-samples.yml @@ -47,4 +47,13 @@ jobs: tenant-id: ${{ secrets.AZURE_OPENID_TENANT_ID }} subscription-id: ${{ secrets.AZURE_OPENID_SUBSCRIPTION_ID }} - name: Publish Samples - run: az storage blob upload-batch --source ~/build-output --destination zips --account-name particulardocs --pattern "*.zip" --overwrite --auth-mode login + shell: pwsh + run: az storage blob upload-batch ` + --source ~/build-output ` + --destination zips ` + --account-name particulardocs ` + --pattern "*.zip" ` + --overwrite ` + --auth-mode login ` + --no-progress + -- From 2381702527ea9420c0bec22e2eedb66c8d2ffd9f Mon Sep 17 00:00:00 2001 From: David Boike Date: Thu, 9 Apr 2026 14:49:58 -0500 Subject: [PATCH 07/10] Whoopsie --- .github/workflows/publish-samples.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/publish-samples.yml b/.github/workflows/publish-samples.yml index 45d156dd744..bf71876a6cf 100644 --- a/.github/workflows/publish-samples.yml +++ b/.github/workflows/publish-samples.yml @@ -56,4 +56,3 @@ jobs: --overwrite ` --auth-mode login ` --no-progress - -- From c4baa29e8557edd88a0a65e68084d653dc986ff4 Mon Sep 17 00:00:00 2001 From: David Boike Date: Thu, 9 Apr 2026 14:54:53 -0500 Subject: [PATCH 08/10] Change to push to master --- .github/workflows/publish-samples.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-samples.yml b/.github/workflows/publish-samples.yml index bf71876a6cf..c73e42c2409 100644 --- a/.github/workflows/publish-samples.yml +++ b/.github/workflows/publish-samples.yml @@ -1,6 +1,7 @@ name: Publish Samples on: - pull_request: + push: + branches: master env: DOTNET_NOLOGO: true permissions: From 30bfe6ee72257d98f649bea04d5ba4aa9feac751 Mon Sep 17 00:00:00 2001 From: David Boike Date: Thu, 9 Apr 2026 14:57:03 -0500 Subject: [PATCH 09/10] Concurrency control --- .github/workflows/publish-samples.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-samples.yml b/.github/workflows/publish-samples.yml index c73e42c2409..3f4fa017ea8 100644 --- a/.github/workflows/publish-samples.yml +++ b/.github/workflows/publish-samples.yml @@ -1,4 +1,4 @@ -name: Publish Samples +name: Publish on: push: branches: master @@ -6,6 +6,9 @@ env: DOTNET_NOLOGO: true permissions: id-token: write +concurrency: + group: publish + cancel-in-progress: true jobs: publish-samples: name: Publish Samples From efc2c1e2fa0f7adb201e795330bc50877773b3b2 Mon Sep 17 00:00:00 2001 From: David Boike Date: Thu, 9 Apr 2026 15:09:57 -0500 Subject: [PATCH 10/10] Remove artifact --- .github/workflows/publish-samples.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-samples.yml b/.github/workflows/publish-samples.yml index 3f4fa017ea8..d92b40b08bd 100644 --- a/.github/workflows/publish-samples.yml +++ b/.github/workflows/publish-samples.yml @@ -9,6 +9,9 @@ permissions: concurrency: group: publish cancel-in-progress: true +defaults: + run: + shell: bash jobs: publish-samples: name: Publish Samples @@ -37,13 +40,6 @@ jobs: run: dotnet tool install Particular.DocsTool --global --add-source https://f.feedz.io/particular-software/packages/nuget/index.json - name: Run docstool run: docstool test --no-version-check --zipfiles --out ~/build-output - - name: Upload Output - uses: actions/upload-artifact@v7 - with: - name: samples - path: ~/build-output - if-no-files-found: error - retention-days: 1 - name: Azure Login uses: azure/login@v3 with: