diff --git a/.github/workflows/ci-sample.yml b/.github/workflows/ci-sample.yml index 8262442..a7cb6a8 100644 --- a/.github/workflows/ci-sample.yml +++ b/.github/workflows/ci-sample.yml @@ -8,6 +8,9 @@ on: pull_request: branches: [ "main" ] +env: + DOTNET_VERSION: '9.0.x' # The .NET SDK version to use + jobs: build-sample-ci: @@ -15,5 +18,11 @@ jobs: steps: - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + - name: Build run: dotnet build samples\Plugin.Maui.Feature.Sample.sln -c Release diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5106de6..f2261af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,9 @@ on: pull_request: branches: [ "main" ] +env: + DOTNET_VERSION: '9.0.x' # The .NET SDK version to use + jobs: build-plugin-ci: @@ -15,5 +18,11 @@ jobs: steps: - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + - name: Build run: dotnet build src\Plugin.Maui.Feature.sln -c Release diff --git a/.github/workflows/release-nuget.yml b/.github/workflows/release-nuget.yml index 3dc3bc6..71047ed 100644 --- a/.github/workflows/release-nuget.yml +++ b/.github/workflows/release-nuget.yml @@ -5,6 +5,10 @@ on: tags: - "v[0-9]+.[0-9]+.[0-9]+" - "v[0-9]+.[0-9]+.[0-9]+-preview[0-9]+" + +env: + DOTNET_VERSION: '9.0.x' # The .NET SDK version to use + jobs: release-nuget: @@ -12,6 +16,12 @@ jobs: steps: - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + - name: Verify commit exists in origin/main run: | git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*