Skip to content

Merge pull request #219 from dsharlet/atomic-save #39

Merge pull request #219 from dsharlet/atomic-save

Merge pull request #219 from dsharlet/atomic-save #39

Workflow file for this run

name: Snapshot
on:
workflow_dispatch: {}
push:
branches:
- master
env:
DOTNET_CLI_TELEMETRY_OPTOUT: '1'
jobs:
snapshot:
name: Snapshot
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-dotnet@v2
with:
# https://dotnet.microsoft.com/en-us/download/dotnet
dotnet-version: '6.0.x'
- name: Collect metadata
id: METADATA
shell: pwsh
run: |
$commit = git rev-parse HEAD
$commit_short = $commit.SubString(0, 7)
echo "commit=$commit" >> $env:GITHUB_OUTPUT
echo "commit_short=$commit_short" >> $env:GITHUB_OUTPUT
echo "build_id=$commit_short-${{ github.run_id }}" >> $env:GITHUB_OUTPUT
- name: Snapshot LiveSPICE
shell: pwsh
run: |
$workdir = Get-Location
cd LiveSPICE
dotnet publish -c Release --framework net6.0-windows /p:DebugType=None /p:UseSharedCompilation=false /p:UseRazorBuildServer=false
Get-ChildItem $workdir\Circuit\Components\ -Filter *.xml | Copy-Item -Destination bin\Release\net6.0-windows\Components\ -Force -PassThru
cd bin\Release
ren net6.0-windows LiveSPICE
Compress-Archive -Path LiveSPICE -DestinationPath $workdir\LiveSPICE.zip
- name: Publish LiveSPICE snapshot
uses: actions/upload-artifact@v3
with:
path: LiveSPICE.zip
name: LiveSPICE-${{ steps.METADATA.outputs.build_id }}.zip
- name: Snapshot LiveSPICEVst
shell: pwsh
run: |
$workdir = Get-Location
cd LiveSPICEVst
dotnet publish -c Release --framework net6.0-windows /p:DebugType=None /p:UseSharedCompilation=false /p:UseRazorBuildServer=false
New-Item -Name "LiveSPICEVst" -ItemType "directory"
New-Item -Name "LiveSPICEVst\Components" -ItemType "directory"
Copy-Item bin\Release\net6.0-windows\LiveSPICEVstBridge.vst3 -Destination LiveSPICEVst\ -Force -PassThru
Get-ChildItem bin\Release\net6.0-windows\ -Filter *.dll | Copy-Item -Destination LiveSPICEVst\ -Force -PassThru
Get-ChildItem bin\Release\net6.0-windows\ -Filter *.json | Copy-Item -Destination LiveSPICEVst\ -Force -PassThru
Get-ChildItem $workdir\Circuit\Components\ -Filter *.xml | Copy-Item -Destination LiveSPICEVst\Components\ -Force -PassThru
Compress-Archive -Path LiveSPICEVst -DestinationPath $workdir\LiveSPICEVst.zip
- name: Publish LiveSPICEVst snapshot
uses: actions/upload-artifact@v3
with:
path: LiveSPICEVst.zip
name: LiveSPICEVst-${{ steps.METADATA.outputs.build_id }}.zip