CM-59551: update changelog #70
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Lint and build. Publish on tag/release creation | |
| on: [ push ] | |
| permissions: | |
| contents: write | |
| jobs: | |
| lint_build_publish: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v2 | |
| with: | |
| vs-version: '[17.0, )' | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x # dotnet 9 breaks "dotnet format" command: https://github.com/dotnet/sdk/issues/43017 | |
| - name: Format check | |
| run: dotnet format --verify-no-changes --verbosity diagnostic | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.nuget/packages | |
| key: nuget-${{ hashFiles('**/*.csproj') }} | |
| restore-keys: nuget- | |
| - name: Restore NuGet packages | |
| run: | | |
| nuget restore src\extension\Cycode.VisualStudio.Extension.14.0-16.0\Cycode.VisualStudio.Extension.14.0-16.0.csproj | |
| nuget restore src\extension\Cycode.VisualStudio.Extension.17.0\Cycode.VisualStudio.Extension.17.0.csproj | |
| - name: Build Cycode.VisualStudio.Extension | |
| run: | | |
| msbuild src\extension\Cycode.VisualStudio.Extension.14.0-16.0\Cycode.VisualStudio.Extension.14.0-16.0.csproj /t:Rebuild /p:Configuration=Release | |
| msbuild src\extension\Cycode.VisualStudio.Extension.17.0\Cycode.VisualStudio.Extension.17.0.csproj /t:Rebuild /p:Configuration=Release | |
| env: | |
| DeployExtension: False | |
| - name: Upload Cycode.VisualStudio.Extension.14.0-16.0 artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Cycode.VisualStudio.Extension.14.0-16.0 | |
| if-no-files-found: error | |
| # We don't use a wildcard pattern here because the path hierarchy is preserved | |
| path: src/extension/Cycode.VisualStudio.Extension.14.0-16.0/bin/Release/Cycode.VisualStudio.Extension.14.0-16.0.vsix | |
| - name: Upload Cycode.VisualStudio.Extension.17.0 artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Cycode.VisualStudio.Extension.17.0 | |
| if-no-files-found: error | |
| # We don't use a wildcard pattern here because the path hierarchy is preserved | |
| path: src/extension/Cycode.VisualStudio.Extension.17.0/bin/Release/Cycode.VisualStudio.Extension.17.0.vsix | |
| - name: Publish Cycode.VisualStudio.Extension.14.0-16.0 to marketplace | |
| # it runs on tag creation only which starts with 'v' (e.g., v1.0.0) | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: | | |
| $VsixPublisher = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe" | |
| & $VsixPublisher login -personalAccessToken ${{ secrets.VSCODE_MARKETPLACE_TOKEN }} -publisherName cycode | |
| & $VsixPublisher publish -payload "src/extension/Cycode.VisualStudio.Extension.14.0-16.0/bin/Release/Cycode.VisualStudio.Extension.14.0-16.0.vsix" -publishManifest "src/extension/Cycode.VisualStudio.Extension.14.0-16.0/publishManifest.json" | |
| - name: Publish Cycode.VisualStudio.Extension.17.0 to marketplace | |
| # it runs on tag creation only which starts with 'v' (e.g., v1.0.0) | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: | | |
| $VsixPublisher = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe" | |
| & $VsixPublisher login -personalAccessToken ${{ secrets.VSCODE_MARKETPLACE_TOKEN }} -publisherName cycode | |
| & $VsixPublisher publish -payload "src/extension/Cycode.VisualStudio.Extension.17.0/bin/Release/Cycode.VisualStudio.Extension.17.0.vsix" -publishManifest "src/extension/Cycode.VisualStudio.Extension.17.0/publishManifest.json" | |
| - name: Publish Cycode.VisualStudio.Extension.14.0-16.0 to GitHub Release | |
| # it runs on tag creation only which starts with 'v' (e.g., v1.0.0) | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| file: src/extension/Cycode.VisualStudio.Extension.14.0-16.0/bin/Release/Cycode.VisualStudio.Extension.14.0-16.0.vsix | |
| tag: ${{ github.ref }} | |
| overwrite: true | |
| - name: Publish Cycode.VisualStudio.Extension.17.0 to GitHub Release | |
| # it runs on tag creation only which starts with 'v' (e.g., v1.0.0) | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| file: src/extension/Cycode.VisualStudio.Extension.17.0/bin/Release/Cycode.VisualStudio.Extension.17.0.vsix | |
| tag: ${{ github.ref }} | |
| overwrite: true | |
| vsix_install_smoke_test: | |
| needs: lint_build_publish | |
| strategy: | |
| matrix: | |
| include: | |
| - runner: windows-latest | |
| vs-name: Visual Studio 2022 | |
| - runner: windows-2025-vs2026 | |
| vs-name: Visual Studio 2026 | |
| runs-on: ${{ matrix.runner }} | |
| name: Smoke test (${{ matrix.vs-name }}) | |
| steps: | |
| - name: Download Cycode.VisualStudio.Extension.17.0 artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: Cycode.VisualStudio.Extension.17.0 | |
| - name: Install VSIX in ${{ matrix.vs-name }} | |
| run: | | |
| $VsixInstaller = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property enginePath | |
| $VsixInstaller = Join-Path $VsixInstaller "VSIXInstaller.exe" | |
| Write-Host "Using VSIXInstaller: $VsixInstaller" | |
| & $VsixInstaller /quiet /admin Cycode.VisualStudio.Extension.17.0.vsix | |
| if ($LASTEXITCODE -ne 0) { throw "VSIXInstaller failed with exit code $LASTEXITCODE" } | |
| Write-Host "VSIX installed successfully in ${{ matrix.vs-name }}" |