From c62b943308aaa7b0bfa5d752670bcfa5e59a4aff Mon Sep 17 00:00:00 2001 From: Bob Loblaw Date: Sat, 21 Jan 2023 17:42:48 +0100 Subject: [PATCH 1/4] Turn on verbose output for dotnet restore --- .github/workflows/release.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6032083..45bd5e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,12 +12,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 6.0.x + - uses: actions/checkout@v3 - name: Replace tokens in appsettings uses: cschleiden/replace-tokens@v1 @@ -29,11 +24,19 @@ jobs: CONNECTION_STRING: ${{secrets.DB_CONNECTION_STRING}} BOT_TOKEN: ${{secrets.BOT_TOKEN}} + - name: Setup .NET Core + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 6.0.x + + - name: Restore dependencies + run: dotnet restore --verbosity detailed + - name: Test - run: dotnet test + run: dotnet test --no-restore - name: Publish - run: dotnet publish -c Release -r linux-x64 -o deploy --no-self-contained + run: dotnet publish -c Release -r linux-x64 -o deploy --no-self-contained --no-restore - name: Generate database migration script if: github.event.inputs.updateDatabase == 'auto' || github.event.inputs.updateDatabase == 'manual' From d41e312dbff8612b55aaad54b5cdb014e0435751 Mon Sep 17 00:00:00 2001 From: Bob Loblaw Date: Sat, 21 Jan 2023 17:48:29 +0100 Subject: [PATCH 2/4] Try with separate dotnet build step --- .github/workflows/release.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 45bd5e4..4aa61e3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,10 +30,13 @@ jobs: dotnet-version: 6.0.x - name: Restore dependencies - run: dotnet restore --verbosity detailed + run: dotnet restore --verbosity normal + + - name: Build + run: dotnet build --no-restore - name: Test - run: dotnet test --no-restore + run: dotnet test --no-build - name: Publish run: dotnet publish -c Release -r linux-x64 -o deploy --no-self-contained --no-restore From 7aad7f18d09607722f5543d5537ef6d6b83b3130 Mon Sep 17 00:00:00 2001 From: Bob Loblaw Date: Sat, 21 Jan 2023 17:57:51 +0100 Subject: [PATCH 3/4] Well ok then --- .github/workflows/release.yml | 2 +- Kattbot/CommandHandlers/Images/DallePromptCommand.cs | 2 +- Kattbot/CommandHandlers/Images/GetBigEmote.cs | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4aa61e3..9f614fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,7 +30,7 @@ jobs: dotnet-version: 6.0.x - name: Restore dependencies - run: dotnet restore --verbosity normal + run: dotnet restore - name: Build run: dotnet build --no-restore diff --git a/Kattbot/CommandHandlers/Images/DallePromptCommand.cs b/Kattbot/CommandHandlers/Images/DallePromptCommand.cs index 496a633..b395938 100644 --- a/Kattbot/CommandHandlers/Images/DallePromptCommand.cs +++ b/Kattbot/CommandHandlers/Images/DallePromptCommand.cs @@ -70,7 +70,7 @@ protected override async Task Handle(DallePromptCommand request, CancellationTok .WithUrl("https://www.craiyon.com/"); var mb = new DiscordMessageBuilder() - .WithFile(fileName, combinedImage.MemoryStream) + .AddFile(fileName, combinedImage.MemoryStream) .WithEmbed(eb) .WithContent($"There you go {request.Ctx.Member?.Mention ?? "Unknown user"}"); diff --git a/Kattbot/CommandHandlers/Images/GetBigEmote.cs b/Kattbot/CommandHandlers/Images/GetBigEmote.cs index 1298221..a802174 100644 --- a/Kattbot/CommandHandlers/Images/GetBigEmote.cs +++ b/Kattbot/CommandHandlers/Images/GetBigEmote.cs @@ -88,8 +88,7 @@ protected override async Task Handle(GetBigEmoteRequest request, CancellationTok var fileName = hasScaleFactor ? "bigger" : "big"; - responseBuilder - .WithFile($"{fileName}.{fileExtension}", imageStream); + responseBuilder.AddFile($"{fileName}.{fileExtension}", imageStream); await ctx.RespondAsync(responseBuilder); } From 907d8e227654877f0e28155f45446be8a6a665d6 Mon Sep 17 00:00:00 2001 From: Bob Loblaw Date: Sat, 21 Jan 2023 18:03:14 +0100 Subject: [PATCH 4/4] Revert --- .github/workflows/release.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9f614fa..c444bee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,17 +29,11 @@ jobs: with: dotnet-version: 6.0.x - - name: Restore dependencies - run: dotnet restore - - - name: Build - run: dotnet build --no-restore - - name: Test - run: dotnet test --no-build + run: dotnet test - name: Publish - run: dotnet publish -c Release -r linux-x64 -o deploy --no-self-contained --no-restore + run: dotnet publish -c Release -r linux-x64 -o deploy --no-self-contained - name: Generate database migration script if: github.event.inputs.updateDatabase == 'auto' || github.event.inputs.updateDatabase == 'manual'