Skip to content

release

release #20

Workflow file for this run

name: release
permissions:
contents: write
on:
push:
tags:
- 'v*'
workflow_dispatch: {}
jobs:
build-and-release:
name: Build and publish Playnite 10 .pext
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.x'
- name: Restore
run: dotnet restore src/SteamShortcutsImporter/SteamShortcutsImporter.csproj
- name: Build
run: dotnet build src/SteamShortcutsImporter/SteamShortcutsImporter.csproj -c Release
- name: Package .pext (zip)
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
$dll = Join-Path "src/SteamShortcutsImporter/bin/Release/net462" "SteamShortcutsImporter.dll"
$manifest = "src/SteamShortcutsImporter/extension.yaml"
$icon = "src/SteamShortcutsImporter/icon.png"
if (!(Test-Path $dll)) { throw "DLL not found: $dll" }
if (!(Test-Path $manifest)) { throw "Manifest not found: $manifest" }
if (Test-Path "SteamShortcutsImporter.pext") { Remove-Item "SteamShortcutsImporter.pext" -Force }
$stage = Join-Path $env:RUNNER_TEMP "pack"
if (Test-Path $stage) { Remove-Item $stage -Recurse -Force }
New-Item -ItemType Directory -Path $stage | Out-Null
Copy-Item $dll $stage
Copy-Item $manifest $stage
if (Test-Path $icon) { Copy-Item $icon $stage }
Compress-Archive -Path (Join-Path $stage '*') -DestinationPath "SteamShortcutsImporter.pext"
- name: Rename artifact with tag
shell: pwsh
run: |
$tag = "$env:GITHUB_REF_NAME"
if ([string]::IsNullOrEmpty($tag)) { $tag = "dev" }
Rename-Item -Path "SteamShortcutsImporter.pext" -NewName "SteamShortcutsImporter-$tag.pext"
# Optional: verify addon manifest if you keep one in the repo root (skipped by default)
# - name: Verify addon manifest (optional)
# shell: pwsh
# run: |
# if (Test-Path ".\addon.yaml") {
# Write-Host "Add-on verification is currently disabled (no Toolbox)."
# } else {
# Write-Host "No addon.yaml found, skipping verify."
# }
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
SteamShortcutsImporter-*.pext
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}