diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ed73e6c..c3995f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -75,42 +75,42 @@ jobs: uses: actions/upload-artifact@v4 with: name: cubic-bot-telegram-app-${{ github.sha }}-linux-arm64 - path: CubicBot.Telegram.App/bin/Release/net8.0/linux-arm64/publish/ + path: CubicBot.Telegram.App/bin/Release/net9.0/linux-arm64/publish/ - name: Upload CubicBot.Telegram.App artifacts for Linux x64 if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v4 with: name: cubic-bot-telegram-app-${{ github.sha }}-linux-x64 - path: CubicBot.Telegram.App/bin/Release/net8.0/linux-x64/publish/ + path: CubicBot.Telegram.App/bin/Release/net9.0/linux-x64/publish/ - name: Upload CubicBot.Telegram.App artifacts for Linux framework-dependent if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v4 with: name: cubic-bot-telegram-app-${{ github.sha }}-linux - path: CubicBot.Telegram.App/bin/Release/net8.0/publish/ + path: CubicBot.Telegram.App/bin/Release/net9.0/publish/ - name: Upload CubicBot.Telegram.App artifacts for Windows ARM64 if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v4 with: name: cubic-bot-telegram-app-${{ github.sha }}-windows-arm64 - path: CubicBot.Telegram.App/bin/Release/net8.0/win-arm64/publish/ + path: CubicBot.Telegram.App/bin/Release/net9.0/win-arm64/publish/ - name: Upload CubicBot.Telegram.App artifacts for Windows x64 if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v4 with: name: cubic-bot-telegram-app-${{ github.sha }}-windows-x64 - path: CubicBot.Telegram.App/bin/Release/net8.0/win-x64/publish/ + path: CubicBot.Telegram.App/bin/Release/net9.0/win-x64/publish/ - name: Upload CubicBot.Telegram.App artifacts for Windows framework-dependent if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v4 with: name: cubic-bot-telegram-app-${{ github.sha }}-windows - path: CubicBot.Telegram.App/bin/Release/net8.0/publish/ + path: CubicBot.Telegram.App/bin/Release/net9.0/publish/ # Upload CubicBot.Telegram.Tool - name: Upload CubicBot.Telegram.Tool artifacts for Linux ARM64 @@ -118,39 +118,39 @@ jobs: uses: actions/upload-artifact@v4 with: name: cubic-bot-telegram-tool-${{ github.sha }}-linux-arm64 - path: CubicBot.Telegram.Tool/bin/Release/net8.0/linux-arm64/publish/ + path: CubicBot.Telegram.Tool/bin/Release/net9.0/linux-arm64/publish/ - name: Upload CubicBot.Telegram.Tool artifacts for Linux x64 if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v4 with: name: cubic-bot-telegram-tool-${{ github.sha }}-linux-x64 - path: CubicBot.Telegram.Tool/bin/Release/net8.0/linux-x64/publish/ + path: CubicBot.Telegram.Tool/bin/Release/net9.0/linux-x64/publish/ - name: Upload CubicBot.Telegram.Tool artifacts for Linux framework-dependent if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v4 with: name: cubic-bot-telegram-tool-${{ github.sha }}-linux - path: CubicBot.Telegram.Tool/bin/Release/net8.0/publish/ + path: CubicBot.Telegram.Tool/bin/Release/net9.0/publish/ - name: Upload CubicBot.Telegram.Tool artifacts for Windows ARM64 if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v4 with: name: cubic-bot-telegram-tool-${{ github.sha }}-windows-arm64 - path: CubicBot.Telegram.Tool/bin/Release/net8.0/win-arm64/publish/ + path: CubicBot.Telegram.Tool/bin/Release/net9.0/win-arm64/publish/ - name: Upload CubicBot.Telegram.Tool artifacts for Windows x64 if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v4 with: name: cubic-bot-telegram-tool-${{ github.sha }}-windows-x64 - path: CubicBot.Telegram.Tool/bin/Release/net8.0/win-x64/publish/ + path: CubicBot.Telegram.Tool/bin/Release/net9.0/win-x64/publish/ - name: Upload CubicBot.Telegram.Tool artifacts for Windows framework-dependent if: matrix.os == 'windows-latest' uses: actions/upload-artifact@v4 with: name: cubic-bot-telegram-tool-${{ github.sha }}-windows - path: CubicBot.Telegram.Tool/bin/Release/net8.0/publish/ + path: CubicBot.Telegram.Tool/bin/Release/net9.0/publish/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5463e9a..0653390 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,14 +64,14 @@ jobs: ZSTD_NBTHREADS: 2 run: | # CubicBot.Telegram.App - cd CubicBot.Telegram.App/bin/Release/net8.0/publish + cd CubicBot.Telegram.App/bin/Release/net9.0/publish tar -acf ../cubic-bot-telegram-app-${{ github.ref_name }}-linux.tar.zst . cd ../linux-arm64/publish tar -acf ../../cubic-bot-telegram-app-${{ github.ref_name }}-linux-arm64.tar.zst . cd ../../linux-x64/publish tar -acf ../../cubic-bot-telegram-app-${{ github.ref_name }}-linux-x64.tar.zst . # CubicBot.Telegram.Tool - cd ../../../../../../CubicBot.Telegram.Tool/bin/Release/net8.0/publish + cd ../../../../../../CubicBot.Telegram.Tool/bin/Release/net9.0/publish tar -acf ../cubic-bot-telegram-tool-${{ github.ref_name }}-linux.tar.zst . cd ../linux-arm64/publish tar -acf ../../cubic-bot-telegram-tool-${{ github.ref_name }}-linux-arm64.tar.zst . @@ -82,7 +82,7 @@ jobs: if: matrix.os == 'windows-latest' run: | # CubicBot.Telegram.App - cd CubicBot.Telegram.App/bin/Release/net8.0/publish + cd CubicBot.Telegram.App/bin/Release/net9.0/publish 7z a -tzip -mx=9 -mfb=128 ../cubic-bot-telegram-app-${{ github.ref_name }}-windows.zip . 7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=64m -ms=on ../cubic-bot-telegram-app-${{ github.ref_name }}-windows.7z . cd ../win-arm64/publish @@ -92,7 +92,7 @@ jobs: 7z a -tzip -mx=9 -mfb=128 ../../cubic-bot-telegram-app-${{ github.ref_name }}-windows-x64.zip . 7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=64m -ms=on ../../cubic-bot-telegram-app-${{ github.ref_name }}-windows-x64.7z . # CubicBot.Telegram.Tool - cd ../../../../../../CubicBot.Telegram.Tool/bin/Release/net8.0/publish + cd ../../../../../../CubicBot.Telegram.Tool/bin/Release/net9.0/publish 7z a -tzip -mx=9 -mfb=128 ../cubic-bot-telegram-tool-${{ github.ref_name }}-windows.zip . 7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=64m -ms=on ../cubic-bot-telegram-tool-${{ github.ref_name }}-windows.7z . cd ../win-arm64/publish @@ -108,7 +108,7 @@ jobs: if: matrix.os == 'ubuntu-latest' with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: CubicBot.Telegram.*/bin/Release/net8.0/*.tar.zst + file: CubicBot.Telegram.*/bin/Release/net9.0/*.tar.zst tag: ${{ github.ref }} file_glob: true prerelease: true @@ -118,7 +118,7 @@ jobs: if: matrix.os == 'windows-latest' with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: CubicBot.Telegram.*/bin/Release/net8.0/cubic-bot-telegram-*-windows*.* + file: CubicBot.Telegram.*/bin/Release/net9.0/cubic-bot-telegram-*-windows*.* tag: ${{ github.ref }} file_glob: true prerelease: true diff --git a/CubicBot.Telegram.App/CubicBot.Telegram.App.csproj b/CubicBot.Telegram.App/CubicBot.Telegram.App.csproj index f317868..3104d7f 100644 --- a/CubicBot.Telegram.App/CubicBot.Telegram.App.csproj +++ b/CubicBot.Telegram.App/CubicBot.Telegram.App.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 enable enable dotnet-CubicBot.Telegram.App-6b3818c3-5fb6-4bba-91c1-f56f55ecc380 diff --git a/CubicBot.Telegram.Tests/CubicBot.Telegram.Tests.csproj b/CubicBot.Telegram.Tests/CubicBot.Telegram.Tests.csproj index 0862ab3..bcfc1c4 100644 --- a/CubicBot.Telegram.Tests/CubicBot.Telegram.Tests.csproj +++ b/CubicBot.Telegram.Tests/CubicBot.Telegram.Tests.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 enable false diff --git a/CubicBot.Telegram.Tool/CubicBot.Telegram.Tool.csproj b/CubicBot.Telegram.Tool/CubicBot.Telegram.Tool.csproj index af1f490..74a717a 100644 --- a/CubicBot.Telegram.Tool/CubicBot.Telegram.Tool.csproj +++ b/CubicBot.Telegram.Tool/CubicBot.Telegram.Tool.csproj @@ -10,7 +10,7 @@ Exe - net8.0 + net9.0 enable enable cubic-bot-telegram-tool diff --git a/CubicBot.Telegram/Commands/Dice.cs b/CubicBot.Telegram/Commands/Dice.cs index 45b4627..f3f0806 100644 --- a/CubicBot.Telegram/Commands/Dice.cs +++ b/CubicBot.Telegram/Commands/Dice.cs @@ -26,8 +26,8 @@ private static int GetCountFromArgument(string? argument = null) private static Task SendAnimatedEmojiAsync(CommandContext commandContext, string emoji, CancellationToken cancellationToken = default) { - var count = GetCountFromArgument(commandContext.Argument); - var tasks = new Task[count]; + int count = GetCountFromArgument(commandContext.Argument); + Span tasks = new Task[count]; for (var i = 0; i < tasks.Length; i++) { diff --git a/CubicBot.Telegram/CubicBot.Telegram.csproj b/CubicBot.Telegram/CubicBot.Telegram.csproj index 00caa4f..6cfed66 100644 --- a/CubicBot.Telegram/CubicBot.Telegram.csproj +++ b/CubicBot.Telegram/CubicBot.Telegram.csproj @@ -12,7 +12,7 @@ Cubic Telegram Bot Public https://github.com/database64128/CubicBot - net8.0 + net9.0 1.2.0