2023-08-08 00:43:18 +00:00
|
|
|
name: LANCommander Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*'
|
2023-08-08 00:47:38 +00:00
|
|
|
jobs:
|
2023-09-04 18:30:11 +00:00
|
|
|
build:
|
2023-08-08 01:12:24 +00:00
|
|
|
runs-on: windows-latest
|
2023-08-08 00:47:38 +00:00
|
|
|
|
|
|
|
steps:
|
2023-08-23 04:47:11 +00:00
|
|
|
- uses: frabert/replace-string-action@v2
|
|
|
|
name: Trim Tag Ref
|
|
|
|
id: trim_tag_ref
|
|
|
|
with:
|
|
|
|
string: '${{ github.ref }}'
|
2023-09-03 20:41:03 +00:00
|
|
|
pattern: 'refs/tags/v'
|
2023-08-23 04:47:11 +00:00
|
|
|
replace-with: ''
|
2023-08-08 00:47:38 +00:00
|
|
|
# Server
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup .NET
|
|
|
|
uses: actions/setup-dotnet@v3
|
|
|
|
with:
|
|
|
|
dotnet-version: 6.0.x
|
|
|
|
- name: Restore dependencies
|
|
|
|
run: dotnet restore
|
2023-09-04 18:13:10 +00:00
|
|
|
- name: Setup Node.js environment
|
|
|
|
uses: actions/setup-node@v3.8.1
|
|
|
|
- run: cd LANCommander/wwwroot/scripts; npm install
|
2023-08-08 00:47:38 +00:00
|
|
|
- name: Build
|
2023-09-03 20:41:03 +00:00
|
|
|
run: dotnet build "./LANCommander/LANCommander.csproj" --no-restore /p:Version="${{ steps.trim_tag_ref.outputs.replaced }}"
|
2023-08-08 00:47:38 +00:00
|
|
|
- name: Publish
|
|
|
|
run: dotnet publish "./LANCommander/LANCommander.csproj" -c Release -o _Build --self-contained --os win -p:PublishSingleFile=true
|
2023-09-03 20:41:03 +00:00
|
|
|
- name: Sign Windows Binary
|
|
|
|
uses: nadeemjazmawe/Sign-action-signtool.exe@v0.1
|
|
|
|
with:
|
|
|
|
certificate: "${{ secrets.CERTIFICATE }}"
|
|
|
|
cert-password: "${{ secrets.CERTIFICATE_PASSWORD }}"
|
|
|
|
filepath: "./_Build/LANCommander.exe"
|
2023-08-08 00:47:38 +00:00
|
|
|
- name: Upload Artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2023-09-04 18:41:32 +00:00
|
|
|
name: LANCommander-v${{ steps.trim_tag_ref.outputs.replaced }}
|
2023-08-08 00:47:38 +00:00
|
|
|
path: "./_Build"
|
|
|
|
# Client
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Setup MSBuild
|
|
|
|
uses: microsoft/setup-msbuild@v1.3.1
|
|
|
|
- name: Setup NuGet
|
|
|
|
uses: NuGet/setup-nuget@v1.1.1
|
|
|
|
- name: Restore NuGet packages
|
|
|
|
run: nuget restore LANCommander.sln
|
|
|
|
- name: Build and Publish Library
|
2023-09-03 20:41:03 +00:00
|
|
|
run: msbuild LANCommander.Playnite.Extension/LANCommander.PlaynitePlugin.csproj /p:Configuration=Release /p:OutputPath=Build /p:Version="${{ steps.trim_tag_ref.outputs.replaced }}"
|
|
|
|
- name: Sign Windows Binary
|
|
|
|
uses: nadeemjazmawe/Sign-action-signtool.exe@v0.1
|
|
|
|
with:
|
|
|
|
certificate: "${{ secrets.CERTIFICATE }}"
|
|
|
|
cert-password: "${{ secrets.CERTIFICATE_PASSWORD }}"
|
2023-09-04 18:30:11 +00:00
|
|
|
filepath: "./LANCommander.Playnite.Extension/Build/LANCommander.PlaynitePlugin.dll"
|
2023-08-08 00:47:38 +00:00
|
|
|
- name: Download Playnite Release
|
|
|
|
uses: robinraju/release-downloader@v1.7
|
|
|
|
with:
|
|
|
|
repository: JosefNemec/Playnite
|
|
|
|
tag: 10.18
|
|
|
|
fileName: Playnite1018.zip
|
|
|
|
- name: Extract Playnite
|
|
|
|
run: Expand-Archive -Path Playnite1018.zip -DestinationPath Playnite
|
2023-09-03 20:41:03 +00:00
|
|
|
- name: Update Manifest Versioning
|
|
|
|
uses: fjogeleit/yaml-update-action@main
|
|
|
|
with:
|
|
|
|
valueFile: "LANCommander.Playnite.Extension/Build/extension.yaml"
|
|
|
|
propertyPath: "Version"
|
|
|
|
value: "${{ steps.trim_tag_ref.outputs.replaced }}"
|
|
|
|
commitChange: false
|
2023-08-08 00:47:38 +00:00
|
|
|
- name: Run Playnite Toolbox
|
|
|
|
run: Playnite/Toolbox.exe pack LANCommander.Playnite.Extension/Build .
|
|
|
|
- name: Upload Artifact
|
|
|
|
uses: actions/upload-artifact@v3.1.2
|
|
|
|
with:
|
2023-09-03 20:41:03 +00:00
|
|
|
name: LANCommander.PlaynitePlugin-v${{ steps.trim_tag_ref.outputs.replaced }}
|
|
|
|
path: LANCommander.PlaynitePlugin_48e1bac7-e0a0-45d7-ba83-36f5e9e959fc_*.pext
|
2023-08-08 00:47:38 +00:00
|
|
|
# Release
|
|
|
|
|