From 1bb5ed7114043f0d3c1db390f42093151f60839c Mon Sep 17 00:00:00 2001 From: HavenDV Date: Thu, 14 Nov 2024 09:48:09 +0400 Subject: [PATCH] feat: Update to net9 --- .github/workflows/auto-merge.yml | 2 +- .github/workflows/auto-update.yml | 5 +++++ .github/workflows/mkdocs.yml | 12 +++++++++--- .github/workflows/pull-request.yml | 1 + src/helpers/FixOpenApiSpec/FixOpenApiSpec.csproj | 2 +- src/helpers/GenerateDocs/GenerateDocs.csproj | 2 +- src/helpers/TrimmingHelper/TrimmingHelper.csproj | 2 +- src/libs/Google.Gemini/Google.Gemini.csproj | 4 ++-- .../Google.Gemini.IntegrationTests.csproj | 6 ++---- 9 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index 0d502c5..881a1f8 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -11,7 +11,7 @@ permissions: jobs: auto-merge: runs-on: ubuntu-latest - if: ${{ (github.actor == 'dependabot[bot]' || github.actor == 'HavenDV') && github.repository_owner == 'tryAGI' }} + if: ${{ github.event.pull_request.draft == false && (github.actor == 'dependabot[bot]' || github.actor == 'HavenDV') && github.repository_owner == 'tryAGI' }} steps: - name: Dependabot metadata if: ${{ github.actor == 'dependabot[bot]' }} diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index 10b7a50..8d607bf 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -29,6 +29,11 @@ jobs: git checkout -b ${{ steps.branch.outputs.branch_name }} origin/main git rebase main + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + - name: Generate code run: | cd src/libs/Google.Gemini diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index f846e82..25da074 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -33,14 +33,20 @@ jobs: - name: Setup Pages uses: actions/configure-pages@v5 - - name: Install dependencies - run: pip install mkdocs-material + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x - name: Generate docs run: dotnet run --project src/helpers/GenerateDocs/GenerateDocs.csproj . - name: Build with MkDocs - run: mkdocs build -d ./_site + run: | + python -m venv myenv + source myenv/bin/activate + pip install mkdocs-material + mkdocs build -d ./_site - name: Upload artifact uses: actions/upload-pages-artifact@v3 diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3c50ca1..60d3aa8 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -7,6 +7,7 @@ on: jobs: test: name: Test + if: github.event.pull_request.draft == false uses: HavenDV/workflows/.github/workflows/dotnet_build-test-publish.yml@main with: generate-build-number: false diff --git a/src/helpers/FixOpenApiSpec/FixOpenApiSpec.csproj b/src/helpers/FixOpenApiSpec/FixOpenApiSpec.csproj index 4c2f96a..27e538c 100644 --- a/src/helpers/FixOpenApiSpec/FixOpenApiSpec.csproj +++ b/src/helpers/FixOpenApiSpec/FixOpenApiSpec.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 Exe preview enable diff --git a/src/helpers/GenerateDocs/GenerateDocs.csproj b/src/helpers/GenerateDocs/GenerateDocs.csproj index f67f521..a47cf75 100644 --- a/src/helpers/GenerateDocs/GenerateDocs.csproj +++ b/src/helpers/GenerateDocs/GenerateDocs.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 enable diff --git a/src/helpers/TrimmingHelper/TrimmingHelper.csproj b/src/helpers/TrimmingHelper/TrimmingHelper.csproj index 454817f..50fc6d1 100644 --- a/src/helpers/TrimmingHelper/TrimmingHelper.csproj +++ b/src/helpers/TrimmingHelper/TrimmingHelper.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net9.0 enable true diff --git a/src/libs/Google.Gemini/Google.Gemini.csproj b/src/libs/Google.Gemini/Google.Gemini.csproj index 58acbd7..e60bf38 100644 --- a/src/libs/Google.Gemini/Google.Gemini.csproj +++ b/src/libs/Google.Gemini/Google.Gemini.csproj @@ -1,7 +1,7 @@ - netstandard2.0;net4.6.2;net6.0;net8.0 + netstandard2.0;net4.6.2;net8.0;net9.0 @@ -15,7 +15,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/src/tests/IntegrationTests/Google.Gemini.IntegrationTests.csproj b/src/tests/IntegrationTests/Google.Gemini.IntegrationTests.csproj index c27a9a4..a34ddda 100644 --- a/src/tests/IntegrationTests/Google.Gemini.IntegrationTests.csproj +++ b/src/tests/IntegrationTests/Google.Gemini.IntegrationTests.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 @@ -9,9 +9,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - - +