From 452040784b9d4abb94fada1304905471bad4b071 Mon Sep 17 00:00:00 2001 From: Florian Dreier Date: Wed, 5 Jul 2023 16:48:22 +0200 Subject: [PATCH] Restore commands --- .github/workflows/actions.yml | 40 ++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index f322ced3..62760da2 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -51,22 +51,32 @@ jobs: run: node_modules/.bin/markdown-pdf -c documentation -s documentation/pdf.css -f A4 documentation/userguide.md - name: Create release zip - run: | - mkdir teamscale_dotnet_profiler\UploadDaemon - mkdir teamscale_dotnet_profiler\Documentation - mkdir teamscale_dotnet_profiler\Licenses - mkdir teamscale_dotnet_profiler\Tools + run: + - mkdir teamscale_dotnet_profiler\UploadDaemon + - mkdir teamscale_dotnet_profiler\Documentation + - mkdir teamscale_dotnet_profiler\Licenses + - mkdir teamscale_dotnet_profiler\Tools - robocopy .\Profiler\bin\Release teamscale_dotnet_profiler *.dll *.pdb || exit 0 - robocopy .\Profiler teamscale_dotnet_profiler Profiler.example.yml || exit 0 - robocopy .\Profiler\bin\Release\UploadDaemon teamscale_dotnet_profiler\UploadDaemon *.* /xf *.pdb || exit 0 - mkdir teamscale_dotnet_profiler\UploadDaemon\service - robocopy .\UploadDaemon\service teamscale_dotnet_profiler\UploadDaemon\service *.* || exit 0 - robocopy .\Profiler\bin\Release\DumpPdb teamscale_dotnet_profiler\Tools *.* /xf *.pdb || exit 0 - robocopy . teamscale_dotnet_profiler LICENSE || exit 0 - robocopy .\Profiler\lib teamscale_dotnet_profiler\Licenses LICENSE /s || exit 0 - robocopy .\documentation teamscale_dotnet_profiler\Documentation userguide.pdf || exit 0 - 7z a teamscale-profiler-dotnet.zip .\teamscale_dotnet_profiler + # robocopy sets weird exit codes (codes != 0 that still signal success) so we need to ignore them + # c.f. https://superuser.com/questions/280425/getting-robocopy-to-return-a-proper-exit-code#346112 + # we achieve this by following up the robocopy commands with "exit 0" + # + # copy Profiler dlls and pdbs + - robocopy .\Profiler\bin\Release teamscale_dotnet_profiler *.dll *.pdb & exit 0 + # copy example config + - robocopy .\Profiler teamscale_dotnet_profiler Profiler.example.yml & exit 0 + # copy UploadDaemon + - robocopy .\Profiler\bin\Release\UploadDaemon teamscale_dotnet_profiler\UploadDaemon *.* /xf *.pdb & exit 0 + - mkdir teamscale_dotnet_profiler\UploadDaemon\service + - robocopy .\UploadDaemon\service teamscale_dotnet_profiler\UploadDaemon\service *.* & exit 0 + # copy DumpPdb + - robocopy .\Profiler\bin\Release\DumpPdb teamscale_dotnet_profiler\Tools *.* /xf *.pdb & exit 0 + # copy Licenses + - robocopy . teamscale_dotnet_profiler LICENSE & exit 0 + - robocopy .\Profiler\lib teamscale_dotnet_profiler\Licenses LICENSE /s & exit 0 + # copy documentation + - robocopy .\documentation teamscale_dotnet_profiler\Documentation userguide.pdf & exit 0 + - 7z a teamscale-profiler-dotnet.zip .\teamscale_dotnet_profiler - name: Upload Release Assets if: startsWith(github.ref, 'refs/tags/v')