diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..35e328a --- /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.CouchbaseExplorer/CodingWithCalvin.CouchbaseExplorer.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.CouchbaseExplorer/bin/Release/CodingWithCalvin.CouchbaseExplorer.info' + json: '{"sha":"${{ github.sha }}", "version":"${{ steps.version.outputs.version }}"}' + + - name: 4. Upload Artifact + uses: actions/upload-artifact@v4 + with: + path: | + src/CodingWithCalvin.CouchbaseExplorer/bin/Release/CodingWithCalvin.CouchbaseExplorer.info + src/CodingWithCalvin.CouchbaseExplorer/bin/Release/CodingWithCalvin.CouchbaseExplorer.vsix diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e2b9a33..f55b225 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 15b6132..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.CouchbaseExplorer/source.extension.vsixmanifest' - extension-source-file: 'src/CodingWithCalvin.CouchbaseExplorer/source.extension.cs' - - - name: 2. Restoring Packages - run: nuget restore src/CodingWithCalvin.CouchbaseExplorer.slnx - - - name: 3. Building Project - run: msbuild 'src/CodingWithCalvin.CouchbaseExplorer/CodingWithCalvin.CouchbaseExplorer.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.CouchbaseExplorer/bin/x64/Release/CodingWithCalvin.CouchbaseExplorer.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.CouchbaseExplorer/bin/x64/Release/CodingWithCalvin.CouchbaseExplorer.info - src/CodingWithCalvin.CouchbaseExplorer/bin/x64/Release/CodingWithCalvin.CouchbaseExplorer.vsix diff --git a/.gitignore b/.gitignore index 818112d..7bf42bb 100644 --- a/.gitignore +++ b/.gitignore @@ -208,6 +208,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.CouchbaseExplorer/CodingWithCalvin.CouchbaseExplorer.csproj b/src/CodingWithCalvin.CouchbaseExplorer/CodingWithCalvin.CouchbaseExplorer.csproj index 5ccf785..1fe2e0d 100644 --- a/src/CodingWithCalvin.CouchbaseExplorer/CodingWithCalvin.CouchbaseExplorer.csproj +++ b/src/CodingWithCalvin.CouchbaseExplorer/CodingWithCalvin.CouchbaseExplorer.csproj @@ -1,193 +1,37 @@ - - - + + - 15.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - true - - - - false - - - - - - - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - latest - prompt - true - - - bin\x64\Release\ - TRACE - true - pdbonly - x64 - latest - prompt - - - - Debug - AnyCPU - 2.0 - {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - {8AF8BEEF-6FCC-4479-8D85-540A414D0EA2} - Library - Properties + net48 CodingWithCalvin.CouchbaseExplorer CodingWithCalvin.CouchbaseExplorer - v4.8 - true - true - true - true - true - false - Program - $(DevEnvDir)devenv.exe - /rootsuffix Exp + latest + bin/$(Configuration)/ + true + + + True + + - - - - CouchbaseExplorerWindowControl.xaml - - - - - True - True - source.extension.vsixmanifest - - - True - True - VSCommandTable.vsct - - - - - - - - - - - - - - - - - - - - - - - - - ConnectionDialog.xaml - - - DocumentEditorControl.xaml - - - - - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - + + + + - - resources\LICENSE - Always + true - - Designer - VsixManifestGenerator - source.extension.cs - - - - - Designer - MSBuild:Compile - - - - - Menus.ctmenu - Designer - VsctGenerator - VSCommandTable.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - 3.8.1 - - - 17.9.37000 - - - - - - resources\icon.png - Always + true - - resources\logo.png - Always + true - - - \ No newline at end of file + + diff --git a/src/CodingWithCalvin.CouchbaseExplorer/Properties/AssemblyInfo.cs b/src/CodingWithCalvin.CouchbaseExplorer/Properties/AssemblyInfo.cs deleted file mode 100644 index c1fcdc2..0000000 --- a/src/CodingWithCalvin.CouchbaseExplorer/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; -using CodingWithCalvin.CouchbaseExplorer; - -[assembly: AssemblyTitle(Vsix.Name)] -[assembly: AssemblyDescription(Vsix.Description)] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany(Vsix.Author)] -[assembly: AssemblyProduct(Vsix.Name)] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -[assembly: ComVisible(false)] -[assembly: AssemblyVersion(Vsix.Version)] -[assembly: AssemblyFileVersion(Vsix.Version)]