Skip to content

feat(core): add name-based fallback matching in export path #178

feat(core): add name-based fallback matching in export path

feat(core): add name-based fallback matching in export path #178

Workflow file for this run

name: build
on:
pull_request:
branches: [ develop ]
workflow_dispatch:
jobs:
build-and-test:
name: Build and Test (Windows)
runs-on: windows-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- uses: actions/checkout@v4
- name: Compute short SHA
id: vars
shell: bash
run: echo "short_sha=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
- 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: Test
run: dotnet test tests/ShortcutsTests/ShortcutsTests.csproj -c Release
- name: Package .pext
shell: pwsh
run: |
$dll = Join-Path "src/SteamShortcutsImporter/bin/Release/net462" "SteamShortcutsImporter.dll"
$manifest = "src/SteamShortcutsImporter/extension.yaml"
$icon = "src/SteamShortcutsImporter/icon.png"
if (Test-Path "SteamShortcutsImporter.pext") { Remove-Item "SteamShortcutsImporter.pext" -Force }
$paths = @($dll, $manifest)
if (Test-Path $icon) { $paths += $icon }
Compress-Archive -Path $paths -DestinationPath "SteamShortcutsImporter.pext"
- name: Rename with commit id
shell: pwsh
run: |
$sha = "${{ steps.vars.outputs.short_sha }}"
Rename-Item -Path "SteamShortcutsImporter.pext" -NewName "SteamShortcutsImporter-$sha.pext"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: SteamShortcutsImporter-${{ steps.vars.outputs.short_sha }}.pext
path: SteamShortcutsImporter-*.pext