CM-39036, CM-39037, CM-39035 - Add Tree View #87
Workflow file for this run
This file contains 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: Build extension and check formatting. Publish extension on workflow dispatch | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Build | |
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: 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: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
DeployExtension: False | |
- name: Upload Cycode.VisualStudio.Extension.14.0-16.0 artifact | |
uses: actions/upload-artifact@v3 | |
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@v3 | |
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 | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
run: | | |
$VsixPublisher = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe" | |
& $VsixPublisher login -personalAccessToken ${{ secrets.PERSONAL_ACCESS_TOKEN }} -publisherName cycodehq | |
& $VsixPublisher.exe 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 | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
run: | | |
$VsixPublisher = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe" | |
& $VsixPublisher login -personalAccessToken ${{ secrets.PERSONAL_ACCESS_TOKEN }} -publisherName cycodehq | |
& $VsixPublisher.exe 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" |