Skip to content

feat: push disk activity to the status bar instead of polling #193

feat: push disk activity to the status bar instead of polling

feat: push disk activity to the status bar instead of polling #193

Workflow file for this run

name: CI / Release
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
jobs:
# ── Build & Test ─────────────────────────────────────────────────────────────
build-and-test:
name: Build & Test
runs-on: windows-latest
permissions:
contents: read
actions: read
checks: write
statuses: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # MinVer needs full git history for tag resolution
- name: Setup .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release
- name: Test
run: dotnet test --no-build -c Release --logger "trx;LogFileName=results.trx"
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: '**/results.trx'
# ── Release ──────────────────────────────────────────────────────────────────
release:
name: Release
needs: build-and-test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: windows-latest
permissions:
contents: write # needed to create GitHub Releases
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore & Publish app (win-x64, framework-dependent)
run: |
dotnet publish src/ManagedDrive.App/ManagedDrive.App.csproj `
-c Release `
-r win-x64 `
--no-self-contained `
-o publish-fx/
shell: pwsh
- name: Publish CLI (win-x64, framework-dependent)
run: |
dotnet publish src/ManagedDrive.Cli/ManagedDrive.Cli.csproj `
-c Release `
-r win-x64 `
--no-self-contained `
-o publish-fx/
shell: pwsh
- name: Resolve version from tag
id: version
run: |
$tag = "${{ github.ref_name }}" # e.g. v1.2.3
echo "tag=$tag" >> $env:GITHUB_OUTPUT
echo "version=$($tag.TrimStart('v'))" >> $env:GITHUB_OUTPUT
shell: pwsh
- name: Build portable package
run: |
$tag = "${{ steps.version.outputs.tag }}"
Compress-Archive -Path publish-fx\* -DestinationPath "ManagedDrive-$tag-win-x64-portable.zip"
shell: pwsh
- name: Prepare installer inputs
run: |
Copy-Item -Path publish-fx -Destination installer\publish-fx -Recurse
Invoke-WebRequest `
-Uri "https://github.com/winfsp/winfsp/releases/download/v2.2B3/winfsp-2.2.26194.msi" `
-OutFile "installer\winfsp-2.2.26194.msi"
shell: pwsh
- name: Install Inno Setup
# Chocolatey's "innosetup" package tops out at 6.x; JRSoftware.InnoSetup.7 is the
# separate winget package for Inno Setup 7. "--scope machine" keeps the install
# location predictable (windows-latest runners already ship Inno Setup 6 under
# Program Files (x86), so a version-specific, non-wildcard lookup is required below).
run: winget install --id JRSoftware.InnoSetup.7 --scope machine --silent --accept-package-agreements --accept-source-agreements
shell: pwsh
- name: Build installer
run: |
$iscc = Get-ChildItem -Path "$env:ProgramFiles", "${env:ProgramFiles(x86)}", "$env:LOCALAPPDATA\Programs" `
-Recurse -Filter "ISCC.exe" -ErrorAction SilentlyContinue |
Where-Object { $_.DirectoryName -like "*Inno Setup 7*" } |
Select-Object -First 1 -ExpandProperty FullName
if (-not $iscc) {
throw "ISCC.exe (Inno Setup 7) not found after installing it."
}
& $iscc "/DAppVersion=${{ steps.version.outputs.version }}" installer\ManagedDrive.iss
shell: pwsh
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: ManagedDrive ${{ github.ref_name }}
generate_release_notes: true
files: |
ManagedDrive-${{ steps.version.outputs.tag }}-win-x64-portable.zip
installer/Output/ManagedDrive-Setup-${{ steps.version.outputs.version }}.exe