Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |