diff --git a/.github/workflows/vsix.yml b/.github/workflows/vsix.yml new file mode 100644 index 00000000..efe25634 --- /dev/null +++ b/.github/workflows/vsix.yml @@ -0,0 +1,121 @@ +name: VSIX + +on: + workflow_dispatch: + push: + branches: + - 'master' + pull_request: + branches: + - '*' + +permissions: + id-token: write # This is required for the federated credential to work + +env: + VERSION: 4.9.${{ github.run_number }} + +jobs: + build: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup MSBuild.exe + uses: microsoft/setup-msbuild@v2 + + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '9.0.201' + + - name: Update Version + run: | + ((Get-Content -Path GUI/SqlCe35Toolbox/Properties/AssemblyInfo.cs -Raw) -Replace "4.8.0.0", "${{ env.VERSION }}") | Set-Content -Path GUI/SqlCe35Toolbox/Properties/AssemblyInfo.cs + ((Get-Content -Path GUI/SqlCe35Toolbox/source.extension.vsixmanifest -Raw) -Replace "4.8.0.0", "${{ env.VERSION }}") | Set-Content -Path GUI/SqlCe35Toolbox/source.extension.vsixmanifest + ((Get-Content -Path GUI/SSMSToolbox/source.extension.vsixmanifest -Raw) -Replace "4.8.0.0", "${{ env.VERSION }}") | Set-Content -Path GUI/SSMSToolbox/source.extension.vsixmanifest + working-directory: src + shell: pwsh + + - name: Install SQL Compact + shell: cmd + run: | + msiexec /i tools\3.5.8109\SSCERuntime-ENU_x86.msi /quiet /qn + msiexec /i tools\3.5.8109\SSCERuntime-ENU_x64.msi /quiet /qn + msiexec /i tools\4.0.8902\SSCERuntime_x64-ENU.msi /quiet /qn + + - name: Restore + shell: cmd + run: | + .nuget\nuget restore .\src\GUI\SqlCeToolbox.sln -NonInteractive -Verbosity quiet -Source "https://api.nuget.org/v3/index.json" + .nuget\nuget restore .\src\API\SqlCeScripting40.sln -NonInteractive -Verbosity quiet -Source "https://api.nuget.org/v3/index.json" + + - name: Build + working-directory: src + shell: cmd + run: | + msbuild API\SqlCeScripting40.sln /p:configuration=Release /v:m + msbuild API\Export2SqlCe.sln /p:configuration=Release /p:Platform="Any CPU" /v:m + msbuild API\ExportSqlCe.sln /p:configuration=Release /p:Platform="Any CPU" /v:m + msbuild API\ExportSqlCe40.sln /p:configuration=Release /p:Platform="Any CPU" /v:m + msbuild GUI\SqlCeToolbox.sln /p:configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:m + msbuild GUI\SqlCe40ToolboxExe.sln /p:configuration=Release /p:Platform="x86" /v:m + + - name: Extract and verify vsix file count + shell: cmd + run: | + mkdir vsix + 7z x src/GUI/SqlCe35Toolbox/bin/Release/SqlCeVsToolbox.vsix -ovsix -y + dir /a:-d /s /b "vsix" | find /c ":\" > filecount.txt + findstr "39" filecount.txt + + - name: Move build output + #if: github.ref == 'refs/heads/master' && github.repository_owner == 'erikej' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') + run: | + mv src/GUI/SqlCe35Toolbox/bin/Release/SqlCeVsToolbox.vsix SqliteToolbox-${{ env.VERSION }}.vsix + mv src/GUI/SSMSToolbox/bin/Release/SSMSToolbox.vsix SqliteSSMSToolbox-${{ env.VERSION }}.vsix + mv src\GUI\SqlCe40ToolboxExe\bin\Release40\SqlCe40ToolBox.exe SqlCe40ToolBox-${{ env.VERSION }}.exe + mv src\GUI\SqlCe40ToolboxExe\bin\Release\SqlCe35ToolBox.exe SqlCe35ToolBox-${{ env.VERSION }}.exe + mv src\API\bin\Release\Export2SqlCE.exe Export2SqlCE-${{ env.VERSION }}.exe + mv src\API\bin\Release\ExportSqlCE.exe ExportSqlCE-${{ env.VERSION }}.exe + mv src\API\bin\Release\ExportSqlCE40.exe ExportSqlCE40-${{ env.VERSION }}.exe + + # - name: Azure CLI login with federated credential + # if: github.event_name != 'pull_request' + # uses: azure/login@v2 + # with: + # client-id: ${{ secrets.AZURE_CLIENT_ID }} + # tenant-id: ${{ secrets.AZURE_TENANT_ID }} + # subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + + # - name: Install dotnet sign + # if: github.event_name != 'pull_request' + # run: dotnet tool install --global sign --prerelease + + # - name: Sign VSIX packages and .exe files # Causes signing requests - max is 5000 per month + # if: github.ref == 'refs/heads/master' && github.repository_owner == 'erikej' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') + # run: sign code trusted-signing ./*.vsix ./*.exe ` + # --trusted-signing-account ErikEJ ` + # --trusted-signing-certificate-profile ErikEJCert ` + # --trusted-signing-endpoint https://weu.codesigning.azure.net ` + # -fl fileslist.txt ` + # --verbosity information + + - name: Publish artifacts + # if: github.ref == 'refs/heads/master' && github.repository_owner == 'erikej' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') + uses: actions/upload-artifact@v4 + with: + name: Artifacts + path: | + *.vsix + *.exe + + - name: Publish to Open VSIX Gallery + if: github.ref == 'refs/heads/master' && github.repository_owner == 'erikej' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') + run: | + $ErrorActionPreference='Stop' + (new-object Net.WebClient).DownloadString("https://raw.github.com/madskristensen/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex + Vsix-PublishToGallery + shell: pwsh + continue-on-error: false diff --git a/.nuget/nuget.exe b/.nuget/nuget.exe index 50cf3495..c8c2be6e 100644 Binary files a/.nuget/nuget.exe and b/.nuget/nuget.exe differ diff --git a/appveyor-sample.yml b/appveyor.yml similarity index 71% rename from appveyor-sample.yml rename to appveyor.yml index 55a0e602..7d46ef43 100644 --- a/appveyor-sample.yml +++ b/appveyor.yml @@ -1,8 +1,9 @@ -version: 4.6.{build} +version: 4.8.{build} branches: only: - master skip_tags: true +image: Visual Studio 2022 configuration: Release platform: x86 assembly_info: @@ -18,26 +19,36 @@ install: Vsix-IncrementVsixVersion | Vsix-UpdateBuildVersion Vsix-IncrementVsixVersion C:\projects\sqlcetoolbox\src\GUI\SqlCe35Toolbox\source.extension.vsixmanifest - - Vsix-IncrementVsixVersion C:\projects\sqlcetoolbox\src\GUI\SqlCe35Toolbox\VS2010\source.extension.vsixmanifest build_script: - cmd: >- + .nuget\nuget restore .\src\GUI\SqlCeToolbox.sln -NonInteractive -Verbosity quiet -Source "https://api.nuget.org/v3/index.json" + + + msiexec /i %APPVEYOR_BUILD_FOLDER%\tools\3.5.8109\SSCERuntime-ENU_x86.msi /quiet /qn + + + msiexec /i %APPVEYOR_BUILD_FOLDER%\tools\3.5.8109\SSCERuntime-ENU_x64.msi /quiet /qn + + + msiexec /i %APPVEYOR_BUILD_FOLDER%\tools\4.0.8902\SSCERuntime_x64-ENU.msi /quiet /qn + + msbuild src\API\SqlCeScripting40.sln /p:configuration=Release /v:m + msbuild src\API\Export2SqlCe.sln /p:configuration=Release /p:Platform="Any CPU" /v:m - msbuild src\API\ExportSqlCe.sln /p:configuration=Release /p:Platform="Any CPU" /v:m - msbuild src\API\ExportSqlCe40.sln /p:configuration=Release /p:Platform="Any CPU" /v:m + msbuild src\API\ExportSqlCe.sln /p:configuration=Release /p:Platform="Any CPU" /v:m - nuget restore src\GUI\SqlCeToolbox.sln -DisableParallelProcessing -Verbosity quiet + msbuild src\API\ExportSqlCe40.sln /p:configuration=Release /p:Platform="Any CPU" /v:m - msbuild src\GUI\SqlCeToolbox.sln /p:configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:m + msbuild src\GUI\SqlCe40ToolboxExe.sln /p:configuration=Release /v:m - msbuild src\GUI\SqlCe40ToolboxExe.sln /p:configuration=Release /v:m + msbuild src\GUI\SqlCeToolbox.sln /p:configuration=Release /p:Platform="Any CPU" /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:m 7z a SqlCe40ToolBox.zip %APPVEYOR_BUILD_FOLDER%\src\GUI\SqlCe40ToolboxExe\bin\Release40\SqlCe40ToolBox.exe @@ -54,4 +65,5 @@ deploy_script: - ps: >- Vsix-PushArtifacts | Vsix-PublishToGallery - Push-AppveyorArtifact C:\projects\sqlcetoolbox\src\GUI\SSMSToolbox\bin\x86\Release\SSMSToolbox.vsix -FileName SSMSToolbox.vsix -DeploymentName "Latest build" \ No newline at end of file + + Push-AppveyorArtifact C:\projects\sqlcetoolbox\src\GUI\SSMSToolbox\bin\Release\SSMSToolbox.vsix -FileName SSMSToolbox.vsix -DeploymentName "Latest build" \ No newline at end of file diff --git a/fileslist.txt b/fileslist.txt new file mode 100644 index 00000000..dd2891e0 --- /dev/null +++ b/fileslist.txt @@ -0,0 +1,11 @@ +ISqlCeScripting.dll +QueryPlanVisualizer.dll +SqlCeScripting.dll +SqlCeScripting40.dll +SqlCeToolbox.Common.dll +SqlCeToolbox.DDEX4.dll +SqlCeToolBoxSyncFxLib.dll +SqlCeVsToolbox.dll +SQLiteScripting.dll +SqlCe40ToolBox.exe +SqlCe35ToolBox.exe diff --git a/src/GUI/SqlCe35Toolbox/Properties/AssemblyInfo.cs b/src/GUI/SqlCe35Toolbox/Properties/AssemblyInfo.cs index 4c8fa626..8b12e24c 100644 --- a/src/GUI/SqlCe35Toolbox/Properties/AssemblyInfo.cs +++ b/src/GUI/SqlCe35Toolbox/Properties/AssemblyInfo.cs @@ -6,7 +6,7 @@ [assembly: AssemblyProduct("ErikEJ.SqlCeToolbox")] [assembly: AssemblyCopyright("Copyright © 2010")] [assembly: ComVisible(false)] -[assembly: AssemblyVersion("4.7.210.0")] -[assembly: AssemblyFileVersion("4.7.210.0")] -[assembly: AssemblyInformationalVersion("4.8-alpha1")] +[assembly: AssemblyVersion("4.8.0.0")] +[assembly: AssemblyFileVersion("4.8.0.0")] +[assembly: AssemblyInformationalVersion("4.8.0.0")] diff --git a/src/GUI/SqlCe40ToolboxExe.sln b/src/GUI/SqlCe40ToolboxExe.sln index 5e2dfc2f..21ebe712 100644 --- a/src/GUI/SqlCe40ToolboxExe.sln +++ b/src/GUI/SqlCe40ToolboxExe.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27703.2035 +# Visual Studio Version 17 +VisualStudioVersion = 17.13.35919.96 d17.13 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlCe40ToolboxExe", "SqlCe40ToolboxExe\SqlCe40ToolboxExe.csproj", "{5168893B-EBF8-4AB4-B231-88F2B3808ABB}" EndProject diff --git a/src/GUI/SqlCe40ToolboxExe/SqlCe40ToolboxExe.csproj b/src/GUI/SqlCe40ToolboxExe/SqlCe40ToolboxExe.csproj index f82da974..c6cc9f24 100644 --- a/src/GUI/SqlCe40ToolboxExe/SqlCe40ToolboxExe.csproj +++ b/src/GUI/SqlCe40ToolboxExe/SqlCe40ToolboxExe.csproj @@ -44,7 +44,7 @@ false - AnyCPU + x86 pdbonly true bin\Release40\