Refactor of the entire upmixing submodule #383
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
name: Build | |
on: | |
- push | |
- workflow_dispatch | |
env: | |
BUILD_CONFIGURATION: Release | |
jobs: | |
Windows: | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=CurrentDate::$(date +'%Y-%m-%d')" | |
- name: Get commit hash | |
id: vars | |
run: echo "::set-output name=ShortHash::$(git rev-parse --short=7 HEAD)" | |
- name: Add MSBuild to PATH | |
uses: microsoft/setup-msbuild@v1.1.3 | |
- name: Restore NuGet packages | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
nuget restore "Cavern.sln" | |
nuget restore "Cavern.Format/Cavern.Format.csproj" | |
- name: Build | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} "Cavern.sln" | |
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} "Cavern.Format/Cavern.Format.csproj" | |
- name: Download base build | |
shell: powershell | |
run: | | |
Invoke-WebRequest -Method Get -Uri "https://cavern.sbence.hu/index.php?t=115&dl=cavern64" -OutFile cavern64.zip -UseBasicParsing | |
mkdir build/Release | |
7z x -obuild/Release cavern64.zip | |
Remove-Item -Path "cavern64.zip" | |
- name: Collect artifacts | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
copy "Cavern.QuickEQ/bin/Release/netstandard2.1/Cavern.dll" "build/Release/Cavern_Data/Managed/Cavern.dll" | |
copy "Cavern.QuickEQ/bin/Release/netstandard2.1/Cavern.QuickEQ.dll" "build/Release/Cavern_Data/Managed/Cavern.QuickEQ.dll" | |
copy "Cavern.Format/bin/Release/netstandard2.1/Cavern.Format.dll" "build/Release/Cavern_Data/Managed/Cavern.Format.dll" | |
copy "Cavern.QuickEQ/bin/Release/CavernAmp.dll" "build/Release/Cavern_Data/Plugins/x86_64/CavernAmp.dll" | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v3.1.0 | |
with: | |
name: "Cavern-Win64_${{steps.date.outputs.CurrentDate}}@${{steps.vars.outputs.ShortHash}}" | |
path: "build/Release/" | |
- name: Compress artifacts | |
uses: vimtor/action-zip@v1 | |
with: | |
files: "build/Release/" | |
dest: "build/Cavern-Win64.zip" | |
- name: GitHub pre-release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{secrets.GITHUB_TOKEN}}" | |
automatic_release_tag: "latest" | |
prerelease: true | |
title: "Cavern @${{steps.vars.outputs.ShortHash}}[${{steps.date.outputs.CurrentDate}}]" | |
files: "build/*.zip" |