0.8.18 - update in one click (#32) #12
Workflow file for this run
This file contains hidden or 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: Release | |
| # Cut a release by pushing a tag: git tag -a v0.1.0 -m "..." && git push origin v0.1.0 | |
| # | |
| # What ships is a single self-contained QuantumWake.exe: the server runs inside | |
| # it and the dashboard is embedded in it, so there is no runtime to install, no | |
| # folder to unpack and nothing to choose between. That is the whole deployment | |
| # story for someone who does not want one. | |
| # | |
| # The CLI is published beside it for anyone verifying parser health, and is | |
| # framework-dependent because that audience already has the SDK. | |
| on: | |
| push: | |
| tags: ['v*'] | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: 'Tag to build (e.g. v0.1.0)' | |
| required: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| ref: ${{ github.event.inputs.tag || github.ref }} | |
| - uses: actions/setup-dotnet@v6 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Version from tag | |
| id: version | |
| shell: pwsh | |
| run: | | |
| $tag = '${{ github.event.inputs.tag }}' | |
| if (-not $tag) { $tag = '${{ github.ref_name }}' } | |
| $version = $tag.TrimStart('v') | |
| # The tag and the repository must agree, or the release lies about | |
| # itself. Publishing passes -p:Version from the tag, so a forgotten | |
| # bump would still produce a correctly stamped binary while the source | |
| # - and the About page of anyone building locally - claimed the old | |
| # number. Failing here is what makes "always bump the version" a rule | |
| # rather than a habit. | |
| $declared = ([xml](Get-Content Directory.Build.props)).SelectSingleNode('//Version').InnerText.Trim() | |
| if ($declared -ne $version) { | |
| throw "Tag $tag wants $version, but Directory.Build.props declares $declared. Bump the version, merge it, then tag the merge commit." | |
| } | |
| Write-Host "Releasing $version (tag and Directory.Build.props agree)" | |
| "tag=$tag" | Out-File $env:GITHUB_OUTPUT -Append | |
| "version=$version" | Out-File $env:GITHUB_OUTPUT -Append | |
| # Never ship a build whose parser fixtures fail: the whole app is a log | |
| # reader, so a red test here means the release would show empty views. | |
| - name: Test | |
| run: dotnet test Quantumwake.slnx -c Release | |
| - name: Publish the application | |
| shell: pwsh | |
| run: | | |
| $shortSha = "${{ github.sha }}".Substring(0, 7) | |
| dotnet publish src/Quantumwake.Overlay -c Release -r win-x64 ` | |
| --self-contained true -p:PublishSingleFile=true ` | |
| -p:EnableCompressionInSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true ` | |
| -p:Version=${{ steps.version.outputs.version }} ` | |
| -p:InformationalVersion="${{ steps.version.outputs.version }}+$shortSha" -o dist/app | |
| if ($LASTEXITCODE -ne 0) { throw 'publish failed' } | |
| # A referenced executable project leaves its runtimeconfig behind. The | |
| # app's own is inside the single file, so this one is just litter. | |
| Remove-Item dist/app/Quantumwake.Server.runtimeconfig.json -ErrorAction SilentlyContinue | |
| $files = Get-ChildItem dist/app -File | |
| if ($files.Count -ne 1) { throw "expected one file, got: $($files.Name -join ', ')" } | |
| - name: Publish the CLI | |
| shell: pwsh | |
| run: | | |
| dotnet publish src/Quantumwake.Cli -c Release -r win-x64 --self-contained false ` | |
| -p:Version=${{ steps.version.outputs.version }} -o dist/cli | |
| if ($LASTEXITCODE -ne 0) { throw 'cli publish failed' } | |
| - name: Archive | |
| id: archive | |
| shell: pwsh | |
| run: | | |
| $version = '${{ steps.version.outputs.version }}' | |
| # The executable ships on its own as well as in the zip: one click from | |
| # the releases page, nothing to unpack. | |
| Copy-Item dist/app/QuantumWake.exe "QuantumWake.exe" | |
| $staging = 'dist/QuantumWake' | |
| New-Item -ItemType Directory -Force $staging | Out-Null | |
| Copy-Item dist/app/QuantumWake.exe $staging | |
| Copy-Item dist/cli/* $staging -Recurse | |
| Copy-Item README.md, LICENSE, NOTICE $staging | |
| $zip = "QuantumWake-$version-win-x64.zip" | |
| Compress-Archive -Path $staging -DestinationPath $zip | |
| "asset=$zip" | Out-File $env:GITHUB_OUTPUT -Append | |
| - name: Release | |
| shell: pwsh | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| # What changed comes out of the README's release notes, so it is | |
| # written once and cannot drift from what the repository claims. A | |
| # version with no section still releases - the standing copy below is | |
| # what most of a release page is - but it says so in the log, because | |
| # a release that does not say what changed is worth noticing. | |
| $version = '${{ steps.version.outputs.version }}' | |
| $readme = Get-Content README.md -Raw | |
| # Single-quoted and concatenated: in a double-quoted string PowerShell | |
| # would read the regex's own $(...) groups as subexpressions to run. | |
| $pattern = '(?ms)^### ' + [regex]::Escape($version) + '\s*$(.*?)(?=^### |\z)' | |
| $section = [regex]::Match($readme, $pattern) | |
| if ($section.Success) { | |
| $changed = "### What changed`n" + $section.Groups[1].Value.Trim() + "`n`n" | |
| } else { | |
| Write-Host "::warning::No '### $version' section in README.md; releasing without a changelog." | |
| $changed = '' | |
| } | |
| $notes = @" | |
| **Quantum Wake ${{ steps.version.outputs.version }}** - a pilot's logbook for Star Citizen. | |
| $changed | |
| **Pre-1.0:** until version 1.0 this product will keep changing significantly | |
| between releases - pages move, data formats shift, an update may re-read your | |
| logs or ask you to re-enable an integration. Everything rebuilds from the | |
| logs, so nothing is lost. | |
| ### Getting it running | |
| Download **QuantumWake.exe** and double-click it. That is the whole | |
| installation: nothing to unpack, no runtime to install, no settings to fill in. | |
| Your Star Citizen install is found automatically. | |
| Quantum Wake then sits in the notification area. Right-click it to open the | |
| dashboard or quit. The in-game overlay is off by default - switch it on from | |
| the dashboard's Settings page or the tray menu, and the choice is remembered. | |
| ``Ctrl+Alt+O`` toggles overlay click-through. | |
| Windows will warn that the publisher is unknown - the executable is not code | |
| signed, which costs money a free fan tool does not have. Choose **More info**, | |
| then **Run anyway**. | |
| The zip additionally contains the command-line tool, which prints per-event | |
| match counts and parser health; it needs the .NET 10 runtime. | |
| ### What it does not do | |
| Reads ``Game.log`` only. Nothing is written to the game directory, no memory is | |
| touched, and nothing is injected. The app connects to the internet only where | |
| you have said it may, from the Settings page - the optional datasets, and the | |
| two that can go out unattended: the version check and the market-price | |
| refresh, both off until you turn them on. | |
| Star Citizen must run in Borderless Windowed for the overlay to be visible. | |
| "@ | |
| gh release create '${{ steps.version.outputs.tag }}' ` | |
| 'QuantumWake.exe' '${{ steps.archive.outputs.asset }}' ` | |
| --title 'Quantum Wake ${{ steps.version.outputs.version }}' ` | |
| --notes $notes |