Merge to main for 1.9.6 release #451
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: VSCode Extension | |
env: | |
IDE_TOOLS_RELEASE_VERSION: 1.9.6 | |
on: | |
push: | |
branches: [ main, develop ] | |
pull_request: | |
branches: [ main, develop ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build-vscode: | |
runs-on: windows-latest | |
name: Build VSCode Extension | |
steps: | |
- name: Checkout current repo | |
uses: actions/checkout@v3 | |
with: | |
path: main | |
submodules: true | |
- if: ${{ github.ref == 'refs/heads/main' }} | |
name: Checkout Meadow.CLI.Core side-by-side | |
uses: actions/checkout@v3 | |
with: | |
repository: WildernessLabs/Meadow.CLI | |
path: Meadow.CLI | |
ref: main | |
- if: ${{ github.ref != 'refs/heads/main' }} | |
name: Checkout Meadow.CLI.Core side-by-side | |
uses: actions/checkout@v3 | |
with: | |
repository: WildernessLabs/Meadow.CLI | |
path: Meadow.CLI | |
ref: develop | |
- name: Setup .NET 8.0.x | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
8.0.x | |
- name: Setup Nuget | |
uses: Nuget/[email protected] | |
- name: Setup Node.js 16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install vsce | |
run: | | |
npm i -g @vscode/vsce | |
npm i -g @vscode/debugprotocol | |
- if: ${{ github.event_name == 'workflow_dispatch' }} | |
name: Update VSCode Version Numbers | |
run: | | |
$content = Get-Content main/package.json | Out-String | |
$newcontent = $content -replace '"version": "1.*",', '"version": "${{ENV.IDE_TOOLS_RELEASE_VERSION}}",' | |
$newcontent | Set-Content main/package.json | |
- name: Restore VSCode Extension dependencies | |
run: | | |
dotnet restore main/src/csharp/VSCodeMeadow.csproj -p:Configuration=Debug -v:diag -bl:restore.binlog | |
- name: Build VSCode Extension | |
id: VSCode-Extension | |
run: dotnet build main/src/csharp/VSCodeMeadow.csproj -p:Configuration=Debug -v:diag -bl:build.binlog | |
- name: Build WebPack | |
run: | | |
cd main | |
npm install -g webpack | |
npm install -D ts-loader | |
npm run webpack | |
- if: ${{ github.ref != 'refs/heads/main' }} | |
name: Build Pre-Release VSIX on non main branch | |
run: | | |
cd main | |
vsce package --pre-release | |
- if: ${{ github.ref == 'refs/heads/main' }} | |
name: Build Release VSIX on main branch | |
run: | | |
cd main | |
vsce package | |
- name: Upload VSIX Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: VSCodeMeadow.vsix.${{ ENV.IDE_TOOLS_RELEASE_VERSION }} | |
path: 'main/*.vsix' | |
- name: Upload Binlog Artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: BinLogs | |
path: '**/*.binlog' | |
- if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' }} | |
name: Publish VSCode Extension | |
run: | | |
cd main | |
vsce publish -p ${{ secrets.MARKETPLACE_PUBLISH_PAT }} |