Skip to content

Commit

Permalink
Update GitHub Actions workflows to use the latest versions of actions…
Browse files Browse the repository at this point in the history
…/setup-dotnet and actions/checkout
  • Loading branch information
shkarface committed Apr 28, 2024
1 parent f99bd9b commit 8ec528f
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 15 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/deploy-nuget.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Deploy To Nuget

on:
Expand All @@ -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
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/tests-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
sonarqube:
type: boolean
required: false
default: fals
default: false

secrets:
SONARQUBE_HOST:
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
14 changes: 14 additions & 0 deletions src/DIT.Workflower/DIT.Workflower.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>

0 comments on commit 8ec528f

Please sign in to comment.