Skip to content

fix: LauncherManager.CreateOrUpdateLauncher accepts resolvedExePath p… #22

fix: LauncherManager.CreateOrUpdateLauncher accepts resolvedExePath p…

fix: LauncherManager.CreateOrUpdateLauncher accepts resolvedExePath p… #22

Workflow file for this run

name: Build and Release
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: windows-latest
steps:
- name: Checkout do código
uses: actions/checkout@v4
- name: Atualizar versão no extension.yaml
run: |
$version = "${{ github.ref_name }}".TrimStart("v")
(Get-Content extension.yaml) -replace '^Version:.*', "Version: $version" |
Set-Content extension.yaml
- name: Compilar plugin principal
run: dotnet build GameTaskPlugin.csproj -c Release
- name: Compilar FocusGuard.exe
run: dotnet build GameTask.FocusGuard/GameTask.FocusGuard.csproj -c Release
- name: Criar o .pext
id: pext
run: |
$version = "${{ github.ref_name }}".TrimStart("v")
$pextName = "GameTask-$version.pext"
Compress-Archive -Force -Path @(
"bin\Release\net48\GameTaskPlugin.dll",
"GameTask.FocusGuard\bin\Release\net48\GameTask.FocusGuard.exe",
"extension.yaml",
"icon.png"
) -DestinationPath "tmp.zip"
Rename-Item -Path "tmp.zip" -NewName $pextName
echo "PEXT_NAME=$pextName" >> $env:GITHUB_OUTPUT
- name: Extrair notas do CHANGELOG
id: changelog
run: |
$tag = "${{ github.ref_name }}"
$content = Get-Content CHANGELOG.md -Raw
$pattern = "(?s)##\s*\[$tag\][^\n]*\n(.+?)(?=\n## \[|$)"
$match = [regex]::Match($content, $pattern)
if ($match.Success) {
$notes = $match.Groups[1].Value.Trim()
} else {
$notes = "See CHANGELOG.md for details."
}
Set-Content -Path "release_notes.md" -Value $notes -Encoding UTF8
echo "NOTES_FILE=release_notes.md" >> $env:GITHUB_OUTPUT
- name: Publicar Release no GitHub
uses: softprops/action-gh-release@v2
with:
files: ${{ steps.pext.outputs.PEXT_NAME }}
body_path: ${{ steps.changelog.outputs.NOTES_FILE }}