From 3b4f96b8e2e24f224105f222eb6fb0597a3a99b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0t=C4=9Bp=C3=A1nek?= Date: Fri, 30 Jan 2026 18:47:15 +0100 Subject: [PATCH 01/12] Move to npm trusted publishing (and add a dry run option) in publish-public.yml --- .github/workflows/publish-public.yml | 14 +++++++++++--- ci/scripts/Copy-NuGetPackages.ps1 | 15 ++++++++++----- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish-public.yml b/.github/workflows/publish-public.yml index 44cbed36b0..9b2ee13931 100644 --- a/.github/workflows/publish-public.yml +++ b/.github/workflows/publish-public.yml @@ -18,6 +18,14 @@ on: default: "" description: The version of the packages to publish publicly required: false + dry-run: + type: boolean + default: false + description: Run the pipeline but don't actually publish anything. + +permissions: + id-token: write # Required for OIDC + contents: read jobs: copy-nuget-packages: @@ -47,6 +55,7 @@ jobs: -include '${{ inputs.include }}' ` -exclude '${{ inputs.exclude }}' ` -version "${{ inputs.version }}" + -dryRun ${{ inputs.dry-run == 'true' && '$true' || '$false' }} shell: pwsh copy-npm-packages: @@ -95,12 +104,11 @@ jobs: run: > ${{ github.workspace }}/ci/scripts/Set-NpmRegistry.ps1 ` -targetDirectory "." ` - -registry "https://registry.npmjs.org/" ` - -authToken "${{ secrets.PUBLIC_NPM_PAT }}" + -registry "https://registry.npmjs.org/" shell: pwsh working-directory: ./artifacts/node_modules/dotvvm-types - name: Publish dotvvm-types to registry.npmjs.org if: steps.include-check.outputs.match == 'true' - run: npm publish --verbose + run: npm publish --verbose ${{ inputs.dry-run == 'true' && '--dry-run' || '' }} working-directory: ./artifacts/node_modules/dotvvm-types diff --git a/ci/scripts/Copy-NuGetPackages.ps1 b/ci/scripts/Copy-NuGetPackages.ps1 index 62578697ec..beb8e7ae78 100644 --- a/ci/scripts/Copy-NuGetPackages.ps1 +++ b/ci/scripts/Copy-NuGetPackages.ps1 @@ -4,7 +4,8 @@ param( [string]$internalNuGetFeedName = "riganti", [string]$include = "*", [string]$exclude = "", - [string]$version = "" + [string]$version = "", + [bool]$dryRun = $false ) if (-not (Test-Path "$root")) { @@ -73,10 +74,14 @@ try { Write-Host "::group::Pushing packages to NuGet.org" try { foreach ($package in (Get-ChildItem "$packagesDir/**/*.nupkg")) { - nuget push "$($package.FullName)" ` - -Source "nuget.org" ` - -ApiKey "$nuGetOrgApiKey" ` - -NonInteractive + if (!($dryRun)) { + nuget push "$($package.FullName)" ` + -Source "nuget.org" ` + -ApiKey "$nuGetOrgApiKey" ` + -NonInteractive + } else { + Write-Host "Skipping 'nuget push' because dry run is active." + } } } finally { Write-Host "::endgroup::" From 9e6a38103be37b4d2a9c9c4399ace3c294027b46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0t=C4=9Bp=C3=A1nek?= Date: Fri, 30 Jan 2026 18:52:46 +0100 Subject: [PATCH 02/12] Fix publish-public.yml --- .github/workflows/publish-public.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-public.yml b/.github/workflows/publish-public.yml index 9b2ee13931..654063d43f 100644 --- a/.github/workflows/publish-public.yml +++ b/.github/workflows/publish-public.yml @@ -55,7 +55,7 @@ jobs: -include '${{ inputs.include }}' ` -exclude '${{ inputs.exclude }}' ` -version "${{ inputs.version }}" - -dryRun ${{ inputs.dry-run == 'true' && '$true' || '$false' }} + -dryRun ${{ inputs.dry-run && '$true' || '$false' }} shell: pwsh copy-npm-packages: @@ -110,5 +110,5 @@ jobs: - name: Publish dotvvm-types to registry.npmjs.org if: steps.include-check.outputs.match == 'true' - run: npm publish --verbose ${{ inputs.dry-run == 'true' && '--dry-run' || '' }} + run: npm publish --verbose ${{ inputs.dry-run && '--dry-run' || '' }} working-directory: ./artifacts/node_modules/dotvvm-types From bf26e6f9c1aada1dec871ca5773ebe981487dd21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0t=C4=9Bp=C3=A1nek?= Date: Fri, 30 Jan 2026 18:55:43 +0100 Subject: [PATCH 03/12] Fix publish-public.yml (2) --- .github/workflows/publish-public.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-public.yml b/.github/workflows/publish-public.yml index 654063d43f..6082ef3b0d 100644 --- a/.github/workflows/publish-public.yml +++ b/.github/workflows/publish-public.yml @@ -54,7 +54,7 @@ jobs: -nuGetOrgApiKey "${{ secrets.NUGET_ORG_API_KEY }}" ` -include '${{ inputs.include }}' ` -exclude '${{ inputs.exclude }}' ` - -version "${{ inputs.version }}" + -version '${{ inputs.version }}' ` -dryRun ${{ inputs.dry-run && '$true' || '$false' }} shell: pwsh From e4bd6d68f05409987877679e761ecd0fbde11c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0t=C4=9Bp=C3=A1nek?= Date: Fri, 30 Jan 2026 19:05:25 +0100 Subject: [PATCH 04/12] Fix publish-public.yml (3) --- .github/workflows/publish-public.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-public.yml b/.github/workflows/publish-public.yml index 6082ef3b0d..b3e29f9161 100644 --- a/.github/workflows/publish-public.yml +++ b/.github/workflows/publish-public.yml @@ -99,14 +99,23 @@ jobs: ls working-directory: ./artifacts - - name: Set public npm registry - if: steps.include-check.outputs.match == 'true' - run: > - ${{ github.workspace }}/ci/scripts/Set-NpmRegistry.ps1 ` - -targetDirectory "." ` - -registry "https://registry.npmjs.org/" + # - name: Set public npm registry + # if: steps.include-check.outputs.match == 'true' + # run: > + # ${{ github.workspace }}/ci/scripts/Set-NpmRegistry.ps1 ` + # -targetDirectory "." ` + # -registry "https://registry.npmjs.org/" + # shell: pwsh + # working-directory: ./artifacts/node_modules/dotvvm-types + + - name: Remove .npmrc + run: rm ./artifacts/node_modules/dotvvm-types/.npmrc shell: pwsh - working-directory: ./artifacts/node_modules/dotvvm-types + + - uses: actions/setup-node@v4 + with: + node-version: '20' + registry-url: 'https://registry.npmjs.org' - name: Publish dotvvm-types to registry.npmjs.org if: steps.include-check.outputs.match == 'true' From 7f5f98892cbdbae9e5f630adb18830026c18bea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0t=C4=9Bp=C3=A1nek?= Date: Fri, 30 Jan 2026 19:06:40 +0100 Subject: [PATCH 05/12] Fix publish-public.yml (4) --- .github/workflows/publish-public.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/publish-public.yml b/.github/workflows/publish-public.yml index b3e29f9161..0beaf4b4b3 100644 --- a/.github/workflows/publish-public.yml +++ b/.github/workflows/publish-public.yml @@ -108,10 +108,6 @@ jobs: # shell: pwsh # working-directory: ./artifacts/node_modules/dotvvm-types - - name: Remove .npmrc - run: rm ./artifacts/node_modules/dotvvm-types/.npmrc - shell: pwsh - - uses: actions/setup-node@v4 with: node-version: '20' From 114fe967af19d4729340214a08194244d1eb99f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0t=C4=9Bp=C3=A1nek?= Date: Fri, 30 Jan 2026 19:13:54 +0100 Subject: [PATCH 06/12] Fix publish-public.yml (5) --- .github/workflows/publish-public.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish-public.yml b/.github/workflows/publish-public.yml index 0beaf4b4b3..50d5864fbf 100644 --- a/.github/workflows/publish-public.yml +++ b/.github/workflows/publish-public.yml @@ -99,21 +99,21 @@ jobs: ls working-directory: ./artifacts - # - name: Set public npm registry - # if: steps.include-check.outputs.match == 'true' - # run: > - # ${{ github.workspace }}/ci/scripts/Set-NpmRegistry.ps1 ` - # -targetDirectory "." ` - # -registry "https://registry.npmjs.org/" - # shell: pwsh - # working-directory: ./artifacts/node_modules/dotvvm-types + - name: Set public npm registry + if: steps.include-check.outputs.match == 'true' + run: > + ${{ github.workspace }}/ci/scripts/Set-NpmRegistry.ps1 ` + -targetDirectory "." ` + -registry "https://registry.npmjs.org/" + shell: pwsh + working-directory: ./artifacts/node_modules/dotvvm-types - - uses: actions/setup-node@v4 - with: - node-version: '20' - registry-url: 'https://registry.npmjs.org' + # - uses: actions/setup-node@v4 + # with: + # node-version: '20' + # registry-url: 'https://registry.npmjs.org' - name: Publish dotvvm-types to registry.npmjs.org if: steps.include-check.outputs.match == 'true' - run: npm publish --verbose ${{ inputs.dry-run && '--dry-run' || '' }} + run: NODE_AUTH_TOKEN="" npm publish --verbose ${{ inputs.dry-run && '--dry-run' || '' }} working-directory: ./artifacts/node_modules/dotvvm-types From 2e4be2b8d8030f3da0ef2e7f3268f58a887d3d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0t=C4=9Bp=C3=A1nek?= Date: Fri, 30 Jan 2026 19:15:49 +0100 Subject: [PATCH 07/12] Fix publish-public.yml (6) --- .github/workflows/publish-public.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish-public.yml b/.github/workflows/publish-public.yml index 50d5864fbf..bd37991aec 100644 --- a/.github/workflows/publish-public.yml +++ b/.github/workflows/publish-public.yml @@ -99,19 +99,19 @@ jobs: ls working-directory: ./artifacts - - name: Set public npm registry - if: steps.include-check.outputs.match == 'true' - run: > - ${{ github.workspace }}/ci/scripts/Set-NpmRegistry.ps1 ` - -targetDirectory "." ` - -registry "https://registry.npmjs.org/" - shell: pwsh - working-directory: ./artifacts/node_modules/dotvvm-types + # - name: Set public npm registry + # if: steps.include-check.outputs.match == 'true' + # run: > + # ${{ github.workspace }}/ci/scripts/Set-NpmRegistry.ps1 ` + # -targetDirectory "." ` + # -registry "https://registry.npmjs.org/" + # shell: pwsh + # working-directory: ./artifacts/node_modules/dotvvm-types - # - uses: actions/setup-node@v4 - # with: - # node-version: '20' - # registry-url: 'https://registry.npmjs.org' + - uses: actions/setup-node@v4 + with: + node-version: '20' + registry-url: 'https://registry.npmjs.org' - name: Publish dotvvm-types to registry.npmjs.org if: steps.include-check.outputs.match == 'true' From ffaf6a375bc35480494517585bd4e94a3900dae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0t=C4=9Bp=C3=A1nek?= Date: Fri, 30 Jan 2026 19:17:24 +0100 Subject: [PATCH 08/12] Fix publish-public.yml (7) --- .github/workflows/publish-public.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-public.yml b/.github/workflows/publish-public.yml index bd37991aec..4d6dc37ae9 100644 --- a/.github/workflows/publish-public.yml +++ b/.github/workflows/publish-public.yml @@ -108,7 +108,7 @@ jobs: # shell: pwsh # working-directory: ./artifacts/node_modules/dotvvm-types - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v6 with: node-version: '20' registry-url: 'https://registry.npmjs.org' From 36414083100236266cbd17b1a8016d7262cfe92a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0t=C4=9Bp=C3=A1nek?= Date: Fri, 30 Jan 2026 19:24:51 +0100 Subject: [PATCH 09/12] Fix publish-public.yml (8) --- .github/workflows/publish-public.yml | 3 +++ package-lock.json | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100644 package-lock.json diff --git a/.github/workflows/publish-public.yml b/.github/workflows/publish-public.yml index 4d6dc37ae9..e2ab5fcb54 100644 --- a/.github/workflows/publish-public.yml +++ b/.github/workflows/publish-public.yml @@ -113,6 +113,9 @@ jobs: node-version: '20' registry-url: 'https://registry.npmjs.org' + - name: Upgrade npm + run: npm install -g npm@latest + - name: Publish dotvvm-types to registry.npmjs.org if: steps.include-check.outputs.match == 'true' run: NODE_AUTH_TOKEN="" npm publish --verbose ${{ inputs.dry-run && '--dry-run' || '' }} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000000..dbce0f3886 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "dotvvm", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} From 28971785d8975405047bd701fd47e6776e95bb07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0t=C4=9Bp=C3=A1nek?= Date: Fri, 30 Jan 2026 19:27:36 +0100 Subject: [PATCH 10/12] Fix publish-public.yml (9) --- .github/workflows/publish-public.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-public.yml b/.github/workflows/publish-public.yml index e2ab5fcb54..727534f72b 100644 --- a/.github/workflows/publish-public.yml +++ b/.github/workflows/publish-public.yml @@ -118,5 +118,5 @@ jobs: - name: Publish dotvvm-types to registry.npmjs.org if: steps.include-check.outputs.match == 'true' - run: NODE_AUTH_TOKEN="" npm publish --verbose ${{ inputs.dry-run && '--dry-run' || '' }} + run: NODE_AUTH_TOKEN="" npm publish --verbose ${{ inputs.dry-run && '--dry-run' || '' }} --tag latest working-directory: ./artifacts/node_modules/dotvvm-types From 5e5c7ab0346c93b5dcd530268320049fad945356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0t=C4=9Bp=C3=A1nek?= Date: Fri, 30 Jan 2026 19:34:10 +0100 Subject: [PATCH 11/12] Fix publish-public.yml (10) --- .github/workflows/publish-public.yml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/publish-public.yml b/.github/workflows/publish-public.yml index 727534f72b..6db3b2c53b 100644 --- a/.github/workflows/publish-public.yml +++ b/.github/workflows/publish-public.yml @@ -99,19 +99,14 @@ jobs: ls working-directory: ./artifacts - # - name: Set public npm registry - # if: steps.include-check.outputs.match == 'true' - # run: > - # ${{ github.workspace }}/ci/scripts/Set-NpmRegistry.ps1 ` - # -targetDirectory "." ` - # -registry "https://registry.npmjs.org/" - # shell: pwsh - # working-directory: ./artifacts/node_modules/dotvvm-types - - - uses: actions/setup-node@v6 - with: - node-version: '20' - registry-url: 'https://registry.npmjs.org' + - name: Set public npm registry + if: steps.include-check.outputs.match == 'true' + run: > + ${{ github.workspace }}/ci/scripts/Set-NpmRegistry.ps1 ` + -targetDirectory "." ` + -registry "https://registry.npmjs.org/" + shell: pwsh + working-directory: ./artifacts/node_modules/dotvvm-types - name: Upgrade npm run: npm install -g npm@latest From 5c5a9a265bcd19d15e049f8d578cd6326af4e512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0t=C4=9Bp=C3=A1nek?= Date: Fri, 30 Jan 2026 19:35:09 +0100 Subject: [PATCH 12/12] Fix publish-public.yml (11) --- .github/workflows/publish-public.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish-public.yml b/.github/workflows/publish-public.yml index 6db3b2c53b..8d7b92902f 100644 --- a/.github/workflows/publish-public.yml +++ b/.github/workflows/publish-public.yml @@ -99,14 +99,10 @@ jobs: ls working-directory: ./artifacts - - name: Set public npm registry - if: steps.include-check.outputs.match == 'true' - run: > - ${{ github.workspace }}/ci/scripts/Set-NpmRegistry.ps1 ` - -targetDirectory "." ` - -registry "https://registry.npmjs.org/" - shell: pwsh - working-directory: ./artifacts/node_modules/dotvvm-types + - uses: actions/setup-node@v6 + with: + node-version: '20' + registry-url: 'https://registry.npmjs.org' - name: Upgrade npm run: npm install -g npm@latest