Skip to content

Release notes and version bump; v1.0.7 #10

Release notes and version bump; v1.0.7

Release notes and version bump; v1.0.7 #10

Workflow file for this run

name: release
on:
push:
tags: ["v*"]
permissions:
contents: write
jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Configure
# No -G pin: use whatever Visual Studio the runner image ships.
run: cmake -S . -B build -A x64
- name: Build
run: cmake --build build --config Release
- name: Package
shell: pwsh
run: |
$stage = "HDRScopes-${{ github.ref_name }}-win64"
New-Item -ItemType Directory "$stage/shaders" -Force | Out-Null
Copy-Item build/Release/HDRScopes.exe $stage/
Copy-Item shaders/*.hlsl, shaders/*.hlsli "$stage/shaders/"
Copy-Item LICENSE, THIRD_PARTY_NOTICES.md $stage/
Compress-Archive -Path $stage -DestinationPath "$stage.zip"
# Pull this tag's section out of CHANGELOG.md for the release body.
# Missing section -> empty body, so the release still publishes (with
# just the auto-generated changelog link appended below).
- name: Extract changelog
shell: pwsh
run: |
$ver = "${{ github.ref_name }}" -replace '^v', ''
$md = Get-Content CHANGELOG.md -Raw
$m = [regex]::Match($md, "(?ms)^##\s+v?$([regex]::Escape($ver))\b[^\n]*\r?\n(.*?)(?=^##\s|\z)")
$body = if ($m.Success) { $m.Groups[1].Value.Trim() } else { "" }
Set-Content release_notes.md $body -Encoding utf8
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: "*.zip"
body_path: release_notes.md
generate_release_notes: true