diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..55f661c --- /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.ProjectRenamifier/CodingWithCalvin.ProjectRenamifier.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.ProjectRenamifier/bin/Release/CodingWithCalvin.ProjectRenamifier.info' + json: '{"sha":"${{ github.sha }}", "version":"${{ steps.version.outputs.version }}"}' + + - name: 4. Upload Artifact + uses: actions/upload-artifact@v4 + with: + path: | + src/CodingWithCalvin.ProjectRenamifier/bin/Release/CodingWithCalvin.ProjectRenamifier.info + src/CodingWithCalvin.ProjectRenamifier/bin/Release/CodingWithCalvin.ProjectRenamifier.vsix diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 88aaafc..a370b58 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 7e6b2f1..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.ProjectRenamifier/source.extension.vsixmanifest' - extension-source-file: 'src/CodingWithCalvin.ProjectRenamifier/source.extension.cs' - - - name: 2. Restoring Packages - run: nuget restore src/CodingWithCalvin.ProjectRenamifier.slnx - - - name: 3. Building Project - run: msbuild 'src/CodingWithCalvin.ProjectRenamifier/CodingWithCalvin.ProjectRenamifier.csproj' /p:configuration='Release' /p:platform='x64' /p:DeployExtension=False - - - name: 4. Create Information File - uses: jsdaniell/create-json@v1.2.3 - with: - name: 'src/CodingWithCalvin.ProjectRenamifier/bin/x64/Release/CodingWithCalvin.ProjectRenamifier.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.ProjectRenamifier/bin/x64/Release/CodingWithCalvin.ProjectRenamifier.info - src/CodingWithCalvin.ProjectRenamifier/bin/x64/Release/CodingWithCalvin.ProjectRenamifier.vsix diff --git a/.gitignore b/.gitignore index 3426770..172c59d 100644 --- a/.gitignore +++ b/.gitignore @@ -183,6 +183,9 @@ orleans.codegen.cs # RIA/Silverlight projects Generated_Code/ +# SDK-style project generated files +Generated/ + # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) diff --git a/src/CodingWithCalvin.ProjectRenamifier/CodingWithCalvin.ProjectRenamifier.csproj b/src/CodingWithCalvin.ProjectRenamifier/CodingWithCalvin.ProjectRenamifier.csproj index 692b4db..7ee50f9 100644 --- a/src/CodingWithCalvin.ProjectRenamifier/CodingWithCalvin.ProjectRenamifier.csproj +++ b/src/CodingWithCalvin.ProjectRenamifier/CodingWithCalvin.ProjectRenamifier.csproj @@ -1,158 +1,32 @@ - - + + - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - latest - - - - Debug - AnyCPU - 2.0 - {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - {BFCC6C14-28BF-40F7-B5C9-DE8D460BBE06} - Library - Properties + net48 CodingWithCalvin.ProjectRenamifier CodingWithCalvin.ProjectRenamifier - v4.8 - true - true - true - true - false - true - true - Program - $(DevEnvDir)devenv.exe - /rootsuffix Exp - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true - full - false - bin\x64\Debug\ - DEBUG;TRACE - prompt - 4 - x64 + latest + bin/$(Configuration)/ + true - - pdbonly - true - bin\x64\Release\ - TRACE - prompt - 4 - x64 + + + True + - - - - RenameProjectDialog.xaml - - - RenameProgressDialog.xaml - - - - - - - - True - True - source.extension.vsixmanifest - - - True - True - VSCommandTable.vsct - - - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - + + - - - Resources\LICENSE + true - - Designer - VsixManifestGenerator - source.extension.cs - - - - - Menus.ctmenu - VsctGenerator - VSCommandTable.cs - - - - - - - - - - - - - - - 17.10.40171 - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - Resources\folder-icon.png + true - - Resources\logo.png + true - - - - \ No newline at end of file + + diff --git a/src/CodingWithCalvin.ProjectRenamifier/Properties/AssemblyInfo.cs b/src/CodingWithCalvin.ProjectRenamifier/Properties/AssemblyInfo.cs deleted file mode 100644 index 14e1291..0000000 --- a/src/CodingWithCalvin.ProjectRenamifier/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,22 +0,0 @@ -using CodingWithCalvin.ProjectRenamifier; -using System.Reflection; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle(Vsix.Name)] -[assembly: AssemblyDescription(Vsix.Description)] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany(Vsix.Author)] -[assembly: AssemblyProduct(Vsix.Name)] -[assembly: AssemblyCopyright(Vsix.Author)] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: ComVisible(false)] - -[assembly: AssemblyVersion(Vsix.Version)] -[assembly: AssemblyFileVersion(Vsix.Version)] - -namespace System.Runtime.CompilerServices -{ - public class IsExternalInit { } -} \ No newline at end of file