Update GitHub Actions workflows to use the latest versions of actions/setup-dotnet and actions/checkout

This commit is contained in:
Shkar T. Noori 2024-04-28 11:26:40 +03:00
parent f99bd9b15c
commit 8ec528f2e0
No known key found for this signature in database
GPG Key ID: C5E1A00F3BB78732
4 changed files with 46 additions and 15 deletions

View File

@ -1,3 +1,4 @@
---
name: Deploy To Nuget
on:
@ -19,13 +20,13 @@ jobs:
build-push:
name: Build and Publish
needs: [test]
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "6.0.x"
dotnet-version: "8.0.x"
- name: Restore packages
run: dotnet restore

View File

@ -13,7 +13,7 @@ on:
sonarqube:
type: boolean
required: false
default: fals
default: false
secrets:
SONARQUBE_HOST:
@ -34,11 +34,11 @@ jobs:
ASPNETCORE_ENVIRONMENT: Testing
steps:
- uses: actions/setup-dotnet@v3
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "6.0.x"
dotnet-version: "8.0.x"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: ${{ !inputs.sonarqube }}
- name: Run tests
@ -48,14 +48,14 @@ jobs:
###############################
########## SONARQUBE ##########
###############################
- name: Set up JDK 11
uses: actions/setup-java@v3
- name: Set up JDK
uses: actions/setup-java@v4
if: ${{ inputs.sonarqube }}
with:
distribution: "zulu"
java-version: "11"
java-version: "17"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: ${{ inputs.sonarqube }}
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

View File

@ -1,13 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
<PackageId>DIT.Workflower.DependencyInjection</PackageId>
<Authors>DIT</Authors>
<Company>DIT</Company>
<!-- Symbols for nuget -->
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<!-- Deterministic Builds -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
<ItemGroup >
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0" Condition="'$(TargetFramework)' == 'net6.0'" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0" Condition="'$(TargetFramework)' == 'net8.0'" />
</ItemGroup>
<ItemGroup>

View File

@ -5,6 +5,20 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<IsPackable>true</IsPackable>
<PackageId>DIT.Workflower</PackageId>
<Authors>DIT</Authors>
<Company>DIT</Company>
<!-- Symbols for nuget -->
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<!-- Deterministic Builds -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
</PropertyGroup>
</Project>