From f4ae328da00424fd53c5f29027ea479abc6846a3 Mon Sep 17 00:00:00 2001 From: Doron Eli Rachman Date: Thu, 2 Jan 2025 12:37:11 +0200 Subject: [PATCH] extract dotnet version to valuable in ci --- .github/workflows/build.yml | 5 +++-- .github/workflows/docs.yml | 5 ++++- .github/workflows/tests.yml | 8 ++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f9d007df..b8d99cf3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,7 @@ defaults: env: SQLC_VERSION: 1.27.0 WASI_SDK_VERSION: 22 + DOTNET_VERSION: '8.0.x' on: push: @@ -28,7 +29,7 @@ jobs: - name: Set up .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: "8.0.x" + dotnet-version: ${{ env.DOTNET_VERSION }} - name: .NET Lint uses: zyactions/dotnet-lint@v1 @@ -55,7 +56,7 @@ jobs: - name: Setup Dotnet uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.0.x' + dotnet-version: ${{ env.DOTNET_VERSION }} - name: install Wasi workload run: dotnet workload install wasi-experimental diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 602654a8..a05f4b29 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -7,6 +7,9 @@ permissions: contents: write pull-requests: write +env: + DOTNET_VERSION: '8.0.x' + on: push: branches: [ "main" ] @@ -26,7 +29,7 @@ jobs: - name: Set up .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: "8.0.x" + dotnet-version: ${{ env.DOTNET_VERSION }} - name: Updating docs run: ./docs/scripts/generate_all_docs.sh diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 47332900..e395af24 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,6 +3,9 @@ defaults: run: shell: bash +env: + DOTNET_VERSION: '8.0.x' + on: push: branches: [ "main" ] @@ -30,6 +33,11 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set up .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + - name: Load .env file uses: xom9ikk/dotenv@v2.3.0 with: