Skip to content

Add CommandPalette TreeLayout commands to declarative config (#1060) #452

Add CommandPalette TreeLayout commands to declarative config (#1060)

Add CommandPalette TreeLayout commands to declarative config (#1060) #452

Workflow file for this run

name: release
on:
push:
branches:
- main
- release/v*
tags:
- v*
paths:
- "src/**"
- "scripts/**"
- "whim-installer.iss"
- "Whim.sln"
- "Directory.Packages.props"
jobs:
create-release:
runs-on: ubuntu-latest
concurrency: ci-create-release-${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create the release
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$channel, $isPrerelease = .\scripts\Get-Channel.ps1
$currentRelease = .\scripts\Get-CurrentWhimRelease.ps1 -Channel $channel
$currentRelease = "v${currentRelease}"
$nextRelease = .\scripts\Get-NextWhimRelease.ps1 -Channel $channel
$nextRelease = "v${nextRelease}"
$resp = gh api repos/$env:GITHUB_REPOSITORY/releases/generate-notes `
-H "Accept: application/vnd.github.v3+json" `
-f tag_name=$nextRelease `
-f previous_tag_name=$currentRelease `
| ConvertFrom-Json
$notes = $resp.body ?? "Initial release"
gh release create "$nextRelease" `
--title "$nextRelease" `
--prerelease="$isPrerelease" `
--notes $notes
release:
runs-on: windows-latest
needs:
- create-release
env:
# We install the packages to the D:\ drive to avoid the slow IO on the C:\ drive.
# Based on https://github.com/actions/setup-dotnet/issues/260#issuecomment-1790162905
NUGET_PACKAGES: D:\a\.nuget\packages
strategy:
matrix:
configuration: [Release]
platform: [x64, arm64]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ${{ env.NUGET_PACKAGES }}
key: ${{ matrix.platform }}-nuget-${{ hashFiles('Directory.Packages.props') }}
restore-keys: |
${{ matrix.platform }}-nuget-${{ hashFiles('Directory.Packages.props') }}
${{ matrix.platform }}-nuget-
- name: Get variables
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$channel, $isPrerelease = .\scripts\Get-Channel.ps1
$currentRelease = .\scripts\Get-CurrentWhimRelease.ps1 -Channel $channel
$version = "v${currentRelease}"
"CurrentRelease=${currentRelease}" >> $env:GITHUB_ENV
"Version=${version}" >> $env:GITHUB_ENV
- name: Restore dependencies
run: |
dotnet restore Whim.sln -p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}
- name: Install dotnet tools
run: |
dotnet tool restore
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2.0.0
- name: Build schema
run: |
.\scripts\Generate-SourceFromSchema.ps1
- name: Build
run: |
msbuild Whim.sln `
-p:Configuration=$env:Configuration `
-p:Platform=$env:Platform `
-p:Version=$env:CurrentRelease `
-p:BuildInParallel=true `
-maxCpuCount
env:
Configuration: ${{ matrix.configuration }}
Platform: ${{ matrix.platform }}
- name: Build release
shell: pwsh
env:
Platform: ${{ matrix.platform }}
run: |
$installerPath = .\scripts\Create-Installer.ps1 -Architecture $env:Platform
"InstallerPath=${installerPath}" >> $env:GITHUB_ENV
- name: Upload release assets
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${env:Version}" "${env:InstallerPath}"