From 3fa27ecf39754a85271864f63628afb008c8e1c2 Mon Sep 17 00:00:00 2001 From: Valerio Date: Sat, 10 Oct 2026 19:45:28 +0200 Subject: [PATCH] Commit the strong-name key Key.snk is now tracked, as Microsoft recommends for open-source projects (a strong name provides identity, not security): local and CI builds share the same assembly identity. The build no longer generates a key when it is missing, and the release workflow no longer needs a secret for it. --- .github/workflows/release.yml | 7 ------- .gitignore | 1 - BUILD.txt | 3 ++- CHANGELOG.txt | 3 ++- Key.snk | Bin 0 -> 596 bytes .../SourceControlSwitcher.csproj | 4 ---- 6 files changed, 4 insertions(+), 14 deletions(-) create mode 100644 Key.snk diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad4d6fe..5f7d4e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,8 +21,6 @@ jobs: runs-on: windows-latest outputs: version: ${{ steps.version.outputs.version }} - env: - SNK_BASE64: ${{ secrets.SNK_BASE64 }} steps: - uses: actions/checkout@v7 @@ -43,11 +41,6 @@ jobs: if (-not (Select-String -Path 'CHANGELOG.txt' -SimpleMatch "SourceControlSwitcher - v$version" -Quiet)) { throw "CHANGELOG.txt has no section for v$version" } "version=$version" >> $env:GITHUB_OUTPUT - - name: Restore strong-name key - if: env.SNK_BASE64 != '' - shell: pwsh - run: '[IO.File]::WriteAllBytes("$PWD/Key.snk", [Convert]::FromBase64String($env:SNK_BASE64))' - - name: Build run: msbuild SourceControlSwitcher.slnx -restore -p:Configuration=Release -p:DeployExtension=false -v:minimal diff --git a/.gitignore b/.gitignore index 53be89f..12615c8 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ development/ dist/* -Key.snk # User-specific files diff --git a/BUILD.txt b/BUILD.txt index e9c9cad..f8c62cf 100644 --- a/BUILD.txt +++ b/BUILD.txt @@ -15,7 +15,8 @@ Open SourceControlSwitcher.slnx and build (Ctrl+Shift+B), or from a Developer Co The VSIX is written to target\Release\SourceControlSwitcher.vsix. -Key.snk (the strong-name key) is not in the repository: a local one is generated on the first build. +Key.snk is the strong-name key of the assembly. It is committed on purpose, as Microsoft recommends for +open-source projects: a strong name provides identity, not security. Tests ----- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b5488bf..11d5cb5 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -17,7 +17,8 @@ SourceControlSwitcher - v1.2.0 VisualHG, VSHG, HgSccPackage (Mercurial support). * Solution migrated to .slnx; unit tests added. * Icon redrawn from the vector logo; Getting Started link in the extension details. - * Extension description localized in Italian, French and German (shown in Manage Extensions). Builds, tests and releases now run + * Extension description localized in Italian, French and German (shown in Manage Extensions). + * The strong-name key (Key.snk) is now in the repository, so every build has the same assembly identity. Builds, tests and releases now run on GitHub Actions (CI on every push and pull request; tag vX.Y.Z publishes to the Marketplace). SourceControlSwitcher - v1.1.2 diff --git a/Key.snk b/Key.snk new file mode 100644 index 0000000000000000000000000000000000000000..ba4344d15a87a96174bcd0b8c58af5cb77eece27 GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50096&y$D(t+ZAVk?Z-;R`y%2n{$)}FzQWgW zy@D!a0m8&?M=wBcFe8kwtQ$53l;7u2RZ`l^Rpvb({~V)hSH6#}I+-yPL8*M_EgJ-8 zs)#L1c-~MONT&j z9oHami!%mgFc=Oo-&k|3vxbbz8J)jYRQ1Wl?=%OKC778vQlv_~sb<5CGy;J$KbTvj z7yzko(@5-Brua90(s%QqZ*AM1u&o>oi2s}Ch$w8ZnM|_OvH$AHGxKgoF42@U8&l(e zP?`n0aUGA_xtL4j7VT(2>E?crBLGxxj1MCZ>oh{+b4)SZ8T-`mR?L08Of4gL<$IY+ z+PzY+*_~sp1pV;%4k1N^JO!z=&%@wm23PQ2LrVywlNPSV?WQ;Q-Mz%EXitejJ%mVi1gFrm6t>=)~$qhy@)tuNr3n literal 0 HcmV?d00001 diff --git a/SourceControlSwitcher/SourceControlSwitcher.csproj b/SourceControlSwitcher/SourceControlSwitcher.csproj index 9560cb0..ef6a11e 100644 --- a/SourceControlSwitcher/SourceControlSwitcher.csproj +++ b/SourceControlSwitcher/SourceControlSwitcher.csproj @@ -142,8 +142,4 @@ - - - -