Skip to content

docs: v0.2.0のCPU消費電力を公開面の主役にする #3

docs: v0.2.0のCPU消費電力を公開面の主役にする

docs: v0.2.0のCPU消費電力を公開面の主役にする #3

Workflow file for this run

name: CI
on:
push:
branches: [main]
paths-ignore: ['**.md', '.github/media/**', '.github/og.png']
pull_request:
paths-ignore: ['**.md', '.github/media/**', '.github/og.png']
workflow_dispatch:
permissions:
contents: read
jobs:
build:
# The app targets net8.0-windows with WinForms, so it only builds on Windows.
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Restore
run: dotnet restore src/OpenDS360
- name: Build
run: dotnet build src/OpenDS360 -c Release --no-restore
- name: Publish self-contained single file
run: dotnet publish src/OpenDS360 -c Release -o dist/app --no-restore
- name: Verify the executable was produced
shell: pwsh
run: |
$exe = 'dist/app/OpenDS360.exe'
if (-not (Test-Path $exe)) { throw "$exe was not produced" }
$mb = [math]::Round((Get-Item $exe).Length / 1MB, 1)
Write-Host "OpenDS360.exe: $mb MB"
# Self-contained builds bundle the runtime; a tiny file means the
# runtime was left out and the build would fail on a clean machine.
if ($mb -lt 20) { throw "Unexpectedly small for a self-contained build ($mb MB)" }