From ea2ba58bafbc6b01c598342400e08b409c3c6b99 Mon Sep 17 00:00:00 2001 From: "Calvin A. Allen" Date: Fri, 2 Jan 2026 18:46:51 -0500 Subject: [PATCH 1/2] feat: modernize to SDK-style project - Convert .csproj to SDK-style using CodingWithCalvin.VsixSdk/0.3.0 - Standardize output path to bin/$(Configuration)/ - Replace msbuild workflow with dotnet build - Rename build workflow from release_build_and_deploy.yml to build.yml - Use CalVer versioning (YYYY.M.D.RunNumber) - Preserve LibGit2Sharp native binary handling --- .github/workflows/build.yml | 42 ++++++ .github/workflows/publish.yml | 2 +- .../workflows/release_build_and_deploy.yml | 46 ------ .../CodingWithCalvin.GitRanger.csproj | 132 +++--------------- 4 files changed, 63 insertions(+), 159 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/release_build_and_deploy.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..200a91f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,42 @@ +name: Build + +on: + workflow_dispatch: + pull_request: + types: [opened, reopened] + push: + branches: + - main + +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + + - name: 1. Generate Version + id: version + run: | + $year = (Get-Date).Year + $month = (Get-Date).Month + $day = (Get-Date).Day + $version = "$year.$month.$day.${{ github.run_number }}" + echo "version=$version" >> $env:GITHUB_OUTPUT + shell: pwsh + + - name: 2. Build Project + run: dotnet build src/CodingWithCalvin.GitRanger/CodingWithCalvin.GitRanger.csproj -c Release -p:SetVsixVersion=${{ steps.version.outputs.version }} + + - name: 3. Create Information File + uses: jsdaniell/create-json@v1.2.3 + with: + name: 'src/CodingWithCalvin.GitRanger/bin/Release/CodingWithCalvin.GitRanger.info' + json: '{"sha":"${{ github.sha }}", "version":"${{ steps.version.outputs.version }}"}' + + - name: 4. Upload Artifact + uses: actions/upload-artifact@v4 + with: + path: | + src/CodingWithCalvin.GitRanger/bin/Release/CodingWithCalvin.GitRanger.info + src/CodingWithCalvin.GitRanger/bin/Release/CodingWithCalvin.GitRanger.vsix diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index da314a0..647a4c3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,7 +26,7 @@ jobs: id: download-artifact uses: dawidd6/action-download-artifact@v6 with: - workflow: release_build_and_deploy.yml + workflow: build.yml workflow_conclusion: success - name: 2. Parse Artifact Manifest diff --git a/.github/workflows/release_build_and_deploy.yml b/.github/workflows/release_build_and_deploy.yml deleted file mode 100644 index 90b71d0..0000000 --- a/.github/workflows/release_build_and_deploy.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: 'Build and Deploy' - -on: - workflow_dispatch: - pull_request: - types: [opened, reopened] - push: - branches: - - main - tags-ignore: - - '[0-9]+.[0-9]+.[0-9]+.[0-9]+' - -jobs: - Release-Build-and-Deploy: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - - uses: microsoft/setup-msbuild@v2 - - uses: nuget/setup-nuget@v2 - - - name: 1. Versioning Release - id: step-version - uses: CodingWithCalvin/GHA-VSVsixVersioner@v1 - with: - extension-manifest-file: 'src/CodingWithCalvin.GitRanger/source.extension.vsixmanifest' - extension-source-file: 'src/CodingWithCalvin.GitRanger/source.extension.cs' - - - name: 2. Restoring Packages - run: nuget restore src/CodingWithCalvin.GitRanger.slnx - - - name: 3. Building Project - run: msbuild 'src/CodingWithCalvin.GitRanger/CodingWithCalvin.GitRanger.csproj' /p:configuration='Release' /p:DeployExtension=False - - - name: 4. Create Information File - uses: jsdaniell/create-json@v1.2.3 - with: - name: 'src/CodingWithCalvin.GitRanger/bin/Release/CodingWithCalvin.GitRanger.info' - json: '{"sha":"${{ github.sha }}", "version":"${{ steps.step-version.outputs.version }}"}' - - - name: 5. Publishing Build Artifact - uses: actions/upload-artifact@v4 - with: - path: | - src/CodingWithCalvin.GitRanger/bin/Release/CodingWithCalvin.GitRanger.info - src/CodingWithCalvin.GitRanger/bin/Release/CodingWithCalvin.GitRanger.vsix diff --git a/src/CodingWithCalvin.GitRanger/CodingWithCalvin.GitRanger.csproj b/src/CodingWithCalvin.GitRanger/CodingWithCalvin.GitRanger.csproj index 67bc366..a0b659b 100644 --- a/src/CodingWithCalvin.GitRanger/CodingWithCalvin.GitRanger.csproj +++ b/src/CodingWithCalvin.GitRanger/CodingWithCalvin.GitRanger.csproj @@ -1,131 +1,38 @@ - - - - 17.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - + + - Debug - AnyCPU - {A1B2C3D4-E5F6-7890-ABCD-EF1234567890} - {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Library - Properties + net48 CodingWithCalvin.GitRanger CodingWithCalvin.GitRanger - v4.8 - 512 - true - true - false - false - true - false - true latest enable - true + bin/$(Configuration)/ - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + + + True + - - - - - - - - - - - - - - - - - - - Component - - - - - - - - - - - - Designer - + + + + + + - - Menus.ctmenu - Designer - + + - - Resources\icon.png + true - PreserveNewest - - Resources\LICENSE + true - - - {B2C3D4E5-F6A7-8901-BCDE-F12345678901} - CodingWithCalvin.GitRanger.Core - - - - - 17.0.507 - - - 17.10.40171 - runtime - - - 17.10.2179 - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - 0.30.0 - - - 2.88.7 - - - 2.88.7 - - - - @@ -144,4 +51,5 @@ - \ No newline at end of file + + From 2a8468234382b517c86d126108467fc5190b3608 Mon Sep 17 00:00:00 2001 From: "Calvin A. Allen" Date: Fri, 2 Jan 2026 18:55:58 -0500 Subject: [PATCH 2/2] fix: remove duplicate AssemblyInfo.cs for SDK-style project --- .gitignore | 1 + .../Properties/AssemblyInfo.cs | 16 ---------------- 2 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 src/CodingWithCalvin.GitRanger/Properties/AssemblyInfo.cs diff --git a/.gitignore b/.gitignore index 6e9a7ea..cbca756 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ bld/ [Oo]bj/ [Ll]og/ [Ll]ogs/ +Generated/ # Visual Studio files .vs/ diff --git a/src/CodingWithCalvin.GitRanger/Properties/AssemblyInfo.cs b/src/CodingWithCalvin.GitRanger/Properties/AssemblyInfo.cs deleted file mode 100644 index be3718a..0000000 --- a/src/CodingWithCalvin.GitRanger/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("Git Ranger")] -[assembly: AssemblyDescription("A visually exciting Git management extension for Visual Studio")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Coding With Calvin")] -[assembly: AssemblyProduct("Git Ranger")] -[assembly: AssemblyCopyright("Copyright (c) Calvin A. Allen 2024")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: ComVisible(false)] - -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")]