Skip to content

Commit

Permalink
Target net 9, update nuget packages
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelj committed Dec 18, 2024
1 parent 8bd04f9 commit e579748
Show file tree
Hide file tree
Showing 6 changed files with 261 additions and 271 deletions.
162 changes: 76 additions & 86 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,86 +1,76 @@
name: CI

on:
push:
branches:
- develop
- master

pull_request:
types: [opened, synchronize, reopened]
branches:
- develop
- master

jobs:
build:
name: Build
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0.100'

- name: Setup GitVersion
uses: gittools/actions/gitversion/setup@v0.9.9
with:
versionSpec: '5.6.x'

- name: GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.9
with:
useConfigFile: true
configFilePath: gitversion.yml

- name: Build - CI
run: |
$adjustedPackageVersion="${{ steps.gitversion.outputs.semVer }}".ToLower();
dotnet build src/NvGet.sln /p:PackageVersion=$adjustedPackageVersion /p:Version=${{ steps.gitversion.outputs.assemblySemVer }} "/p:PackageOutputPath=$env:GITHUB_WORKSPACE\artifacts" /p:GeneratePackageOnBuild=true
- name: Run Unit Tests
run: |
cd src
dotnet test
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: NuGet
path: .\artifacts

publish:
name: Publish
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/master')) }}
runs-on: windows-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: NuGet
path: artifacts

- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'

- name: NuGet Push
run: |
dotnet nuget push artifacts\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_ORG_API_KEY }}
name: CI

on:
push:
branches:
- develop
- master

pull_request:
types: [opened, synchronize, reopened]
branches:
- develop
- master

jobs:
build:
name: Build
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: "9.0.101"

- name: GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.9
with:
useConfigFile: true
configFilePath: gitversion.yml

- name: Build - CI
run: |
$adjustedPackageVersion="${{ steps.gitversion.outputs.semVer }}".ToLower();
dotnet build src/NvGet.sln /p:PackageVersion=$adjustedPackageVersion /p:Version=${{ steps.gitversion.outputs.assemblySemVer }} "/p:PackageOutputPath=$env:GITHUB_WORKSPACE\artifacts" /p:GeneratePackageOnBuild=true
- name: Run Unit Tests
run: |
cd src
dotnet test
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: NuGet
path: .\artifacts

publish:
name: Publish
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/master')) }}
runs-on: windows-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Download Artifacts
uses: actions/download-artifact@v4.1.7
with:
name: NuGet
path: artifacts

- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: "9.0.x"

- name: NuGet Push
run: |
dotnet nuget push artifacts\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_ORG_API_KEY }}
54 changes: 27 additions & 27 deletions src/NvGet.Tests/NvGet.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="Mono.Options" Version="6.6.0.161" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\NvGet\NvGet.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="Resources\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<Import Project="..\NvGet.Tools.Shared\NvGet.Tools.Shared.projitems" Label="Shared" />

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.4" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.4" />
<PackageReference Include="Mono.Options" Version="6.6.0.161" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\NvGet\NvGet.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="Resources\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<Import Project="..\NvGet.Tools.Shared\NvGet.Tools.Shared.projitems" Label="Shared" />

</Project>
74 changes: 37 additions & 37 deletions src/NvGet.Tools.Downloader/NvGet.Tools.Downloader.csproj
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackAsTool>true</PackAsTool>
<ToolCommandName>nugetdownloader</ToolCommandName>
<LangVersion>latest</LangVersion>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
</PropertyGroup>

<!-- NuGet metadata -->
<PropertyGroup>
<PackageId>nventive.NuGet.Downloader.Tool</PackageId>
<Authors>nventive</Authors>
<Owners>nventive</Owners>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackAsTool>true</PackAsTool>
<ToolCommandName>nugetdownloader</ToolCommandName>
<LangVersion>latest</LangVersion>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
</PropertyGroup>

<!-- NuGet metadata -->
<PropertyGroup>
<PackageId>nventive.NuGet.Downloader.Tool</PackageId>
<Authors>nventive</Authors>
<Owners>nventive</Owners>
<Description>Nuget Downloader allows to download the NuGet packages found in a solution</Description>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageIcon>icon.png</PackageIcon>
<PackageProjectUrl>https://github.com/nventive/NuGet.Updater</PackageProjectUrl>
</PropertyGroup>

<ItemGroup>
<None Include="../icon.png">
<Pack>True</Pack>
<PackagePath />
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Mono.Options" Version="6.6.0.161" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\NvGet\NvGet.csproj" />
</ItemGroup>
</Project>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageIcon>icon.png</PackageIcon>
<PackageProjectUrl>https://github.com/nventive/NuGet.Updater</PackageProjectUrl>
</PropertyGroup>

<ItemGroup>
<None Include="../icon.png">
<Pack>True</Pack>
<PackagePath />
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Mono.Options" Version="6.6.0.161" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\NvGet\NvGet.csproj" />
</ItemGroup>
</Project>
78 changes: 39 additions & 39 deletions src/NvGet.Tools.Hierarchy/NvGet.Tools.Hierarchy.csproj
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackAsTool>true</PackAsTool>
<ToolCommandName>nugethierarchy</ToolCommandName>
<LangVersion>latest</LangVersion>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
</PropertyGroup>

<!-- NuGet metadata -->
<PropertyGroup>
<PackageId>nventive.NuGet.Hierarchy.Tool</PackageId>
<Title>NuGet Hierarchy Tool</Title>
<Description>NuGet Hierarchy allows you to view the dependency tree of a solution</Description>
<Authors>nventive</Authors>
<Owners>nventive</Owners>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageIcon>icon.png</PackageIcon>
<PackageProjectUrl>https://github.com/nventive/NuGet.Updater</PackageProjectUrl>
</PropertyGroup>

<ItemGroup>
<None Include="../icon.png">
<Pack>True</Pack>
<PackagePath />
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Mono.Options" Version="6.6.0.161" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\NvGet\NvGet.csproj" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackAsTool>true</PackAsTool>
<ToolCommandName>nugethierarchy</ToolCommandName>
<LangVersion>latest</LangVersion>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
</PropertyGroup>

<!-- NuGet metadata -->
<PropertyGroup>
<PackageId>nventive.NuGet.Hierarchy.Tool</PackageId>
<Title>NuGet Hierarchy Tool</Title>
<Description>NuGet Hierarchy allows you to view the dependency tree of a solution</Description>
<Authors>nventive</Authors>
<Owners>nventive</Owners>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageIcon>icon.png</PackageIcon>
<PackageProjectUrl>https://github.com/nventive/NuGet.Updater</PackageProjectUrl>
</PropertyGroup>

<ItemGroup>
<None Include="../icon.png">
<Pack>True</Pack>
<PackagePath />
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Mono.Options" Version="6.6.0.161" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\NvGet\NvGet.csproj" />
</ItemGroup>
</Project>
Loading

0 comments on commit e579748

Please sign in to comment.