-
-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (43 loc) · 1.75 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
on:
release:
types: [published]
name: Build and Upload Release Asset
jobs:
build:
name: Build and Upload Release Asset
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Setup NuGet.exe
uses: nuget/setup-nuget@v1
- name: Restore NuGet Packages
run: nuget restore HtmlExporterPlugin.sln
- name: Build and Publish
run: |
msbuild HtmlExporterPlugin.sln /p:Configuration=Release
$version = ($env:GITHUB_REF -Split "/")[-1]
echo "VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Setup Playnite
run: |
mkdir playnite
Invoke-WebRequest -Uri "https://github.com/JosefNemec/Playnite/releases/download/9.16/Playnite916.zip" -OutFile "playnite\Playnite916.zip"
Expand-Archive "playnite\playnite916.zip" -DestinationPath "playnite"
- name: Package release
run: |
mkdir release
playnite\toolbox.exe pack "bin\release" "release"
$contents = Get-ChildItem -Path "release" -Force -Recurse -File | Select-Object -First 1
echo "PEXTFILE=$contents" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.PEXTFILE }}
asset_name: Html-Exporter-${{ env.VERSION }}.pext
asset_content_type: application/zip