Added the ability to reupload logs when receiving error 408 #197
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 and test | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
# Do not run duplicate actions on pull_request. | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Setup .NET 8 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
# This is a workaround for issue https://github.com/actions/virtual-environments/issues/1090, | |
# which causes to nuget restores to fail | |
- name: Clean NuGet cache | |
run: dotnet nuget locals all --clear | |
- name: Build | |
run: dotnet build PlenBotLogUploader.csproj -c Release | |
- name: Test | |
run: dotnet test PlenBotLogUploader.csproj --no-restore --verbosity normal | |
- name: Package PlenBotLogUploader (Windows) | |
run: dotnet publish PlenBotLogUploader.csproj -c Release -r win-x64 --self-contained=false -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:IncludeAllContentForSelfExtract=true -o artifacts/uploader/win64/ | |
- name: Package PlenBotLogUploader (Windows, self-contained) | |
run: dotnet publish PlenBotLogUploader.csproj -c Release -r win-x64 --self-contained=true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:IncludeAllContentForSelfExtract=true -o artifacts/uploader/win64-sc/ | |
- name: Bundle PDBs | |
run: | | |
mkdir -p artifacts/pdb/uploader/win64/ | |
mv artifacts/uploader/win64/*.pdb artifacts/pdb/uploader/win64/ | |
- name: Upload PlenBotLogUploader (Windows, self-contained) | |
uses: actions/[email protected] | |
with: | |
name: PlenBotLogUploader (Windows) | |
path: artifacts/uploader/win64-sc/PlenBotLogUploader.exe | |
- name: Upload PDB files | |
uses: actions/[email protected] | |
with: | |
name: PDB files | |
path: artifacts/pdb/ |