-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (44 loc) · 1.79 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
53
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@v2
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Setup NuGet.exe
uses: nuget/setup-nuget@v1
- name: Restore NuGet Packages
run: nuget restore IsthereanydealCollectionSync.sln
- name: Build and Publish
run: |
msbuild IsthereanydealCollectionSync.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/10.33/Playnite1033.zip" -OutFile "playnite\Playnite1033.zip"
Expand-Archive "playnite\Playnite1033.zip" -DestinationPath "playnite"
- name: Package release
run: |
Copy-Item LICENSE bin\release
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: IsthereanydealCollectionSync-${{ env.VERSION }}.pext
asset_content_type: application/zip