Skip to content

Adrian cli v2 updates #511

Adrian cli v2 updates

Adrian cli v2 updates #511

Workflow file for this run

name: VS4Win Extension
env:
IDE_TOOLS_RELEASE_VERSION: 2.0.0
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
workflow_dispatch:
jobs:
build-2022:
runs-on: windows-2022
name: Build VS2022 Extension
steps:
- name: Checkout current repo
uses: actions/checkout@v4
with:
path: main
- if: ${{ github.ref == 'refs/heads/main' }}
name: Checkout Meadow.CLI side-by-side
uses: actions/checkout@v4
with:
repository: WildernessLabs/Meadow.CLI
path: Meadow.CLI
ref: main
- if: ${{ github.ref != 'refs/heads/main' }}
name: Checkout Meadow.CLI side-by-side
uses: actions/checkout@v4
with:
repository: WildernessLabs/Meadow.CLI
path: Meadow.CLI
ref: dominique-V2022ToV2
- name: Checkout Meadow.Contracts side-by-side
uses: actions/checkout@v4
with:
repository: WildernessLabs/Meadow.Contracts
path: Meadow.Contracts
ref: main
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
- name: Setup NuGet
uses: NuGet/setup-nuget@v2
- name: Add MSBuild to Path
uses: microsoft/setup-msbuild@v2
with:
vs-version: '[17.0, 18.0)'
- if: ${{ github.event_name == 'workflow_dispatch' }}
name: Update VS2022 Version Numbers
run: |
$content = Get-Content main/VS_Meadow_Extension/VS_Meadow_Extension.2022/source.extension.vsixmanifest | Out-String
$newcontent = $content -replace 'Version="1.*" Language="en-US" Publisher="Wilderness Labs"', 'Version="${{ ENV.IDE_TOOLS_RELEASE_VERSION }}" Language="en-US" Publisher="Wilderness Labs"'
$newcontent | Set-Content main/VS_Meadow_Extension/VS_Meadow_Extension.2022/source.extension.vsixmanifest
- name: Restore VS2022 dependencies
run: msbuild main/VS_Meadow_Extension.2022.sln /t:Restore /p:Configuration=Release
- name: Build VS2022 Extension
id: VS2022-Extension
run: msbuild main/VS_Meadow_Extension.2022.sln /t:Rebuild /p:Configuration=Release
env:
DevEnvDir: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE'
- name: Upload VSIX Artifacts
uses: actions/upload-artifact@v4
with:
name: Meadow.Win.VS2022.vsix.${{ ENV.IDE_TOOLS_RELEASE_VERSION }}
path: 'main\VS_Meadow_Extension\VS_Meadow_Extension.2022\bin\Release\*.vsix'
# - uses: actions/create-release@v1
# id: create_vs2022_release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.ref }}
# release_name: ${{ github.ref }}
- if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' }}
name: Publish VS2022 Extension
run: |
& "${env:ProgramFiles}\Microsoft Visual Studio\2022\Enterprise\VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe" publish -payload "main\VS_Meadow_Extension\VS_Meadow_Extension.2022\bin\Release\Meadow.2022.vsix" -publishManifest "main\publishManifest.2022.json" -ignoreWarnings "None" -personalAccessToken "${{secrets.MARKETPLACE_PUBLISH_PAT}}"