From 9cf9826e009a5b05323d0c35c38e7aacdf7108cc Mon Sep 17 00:00:00 2001 From: Jonas Gottschau Date: Thu, 3 Oct 2024 20:51:34 +0200 Subject: [PATCH] Update workflows to set assembly version target net8 --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 11 +++--- .../Hangfire.Mongo.Sample.ASPNetCore.csproj | 3 +- .../Hangfire.Mongo.Sample.CosmosDB.csproj | 3 +- .../Hangfire.Mongo.Sample.NETCore.csproj | 3 +- .../Hangfire.Mongo.Tests.csproj | 4 +-- src/Hangfire.Mongo.sln | 6 ++++ src/Hangfire.Mongo/Hangfire.Mongo.csproj | 17 ++++----- src/Hangfire.Mongo/Properties/AssemblyInfo.cs | 36 ------------------- 9 files changed, 22 insertions(+), 63 deletions(-) delete mode 100644 src/Hangfire.Mongo/Properties/AssemblyInfo.cs diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2035121..14c3716 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore ./src diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 645f873..07d61af 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,19 +22,17 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 8.0.x - name: Restore dependencies run: dotnet restore ./src - + - name: Build - run: dotnet publish ./src -c Release --no-restore -o ./release + run: dotnet build ./src/Hangfire.Mongo/Hangfire.Mongo.csproj -c Release --no-restore /p:AssemblyVersion=${{ github.event.inputs.version }} /p:Version=${{ github.event.inputs.version }} - name: Test run: dotnet test ./src -c Release --no-build --verbosity normal - - name: Zip - run: zip -qr Hangfire.Mongo-${{ github.event.inputs.version }}.zip ./release - name: Create a Release uses: softprops/action-gh-release@v1 @@ -44,7 +42,6 @@ jobs: tag_name: ${{ github.event.inputs.version }} draft: false prerelease: false - files: Hangfire.Mongo-${{ github.event.inputs.version }}.zip - name: Publish to nuget.org - run: dotnet nuget push src/Hangfire.Mongo/bin/Release/Hangfire.Mongo.*.nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json + run: dotnet nuget push src/Hangfire.Mongo/bin/Release/Hangfire.Mongo.${{ github.event.inputs.version }}.nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json diff --git a/src/Hangfire.Mongo.Sample.ASPNetCore/Hangfire.Mongo.Sample.ASPNetCore.csproj b/src/Hangfire.Mongo.Sample.ASPNetCore/Hangfire.Mongo.Sample.ASPNetCore.csproj index 4216395..5f0945a 100644 --- a/src/Hangfire.Mongo.Sample.ASPNetCore/Hangfire.Mongo.Sample.ASPNetCore.csproj +++ b/src/Hangfire.Mongo.Sample.ASPNetCore/Hangfire.Mongo.Sample.ASPNetCore.csproj @@ -1,8 +1,7 @@ - net6.0 + net8.0 - 1.10.8 MongoDB storage implementation for Hangfire (background job system for ASP.NET applications). Copyright © 2014-2019 Sergey Zwezdin, Martin Lobger, Jonas Gottschau Sergey Zwezdin, Martin Lobger, Jonas Gottschau diff --git a/src/Hangfire.Mongo.Sample.CosmosDB/Hangfire.Mongo.Sample.CosmosDB.csproj b/src/Hangfire.Mongo.Sample.CosmosDB/Hangfire.Mongo.Sample.CosmosDB.csproj index 109b36a..3169483 100644 --- a/src/Hangfire.Mongo.Sample.CosmosDB/Hangfire.Mongo.Sample.CosmosDB.csproj +++ b/src/Hangfire.Mongo.Sample.CosmosDB/Hangfire.Mongo.Sample.CosmosDB.csproj @@ -1,8 +1,7 @@ - net6.0 + net8.0 - 1.10.8 MongoDB storage implementation for Hangfire (background job system for ASP.NET applications). Copyright © 2014-2019 Sergey Zwezdin, Martin Lobger, Jonas Gottschau Sergey Zwezdin, Martin Lobger, Jonas Gottschau diff --git a/src/Hangfire.Mongo.Sample.NETCore/Hangfire.Mongo.Sample.NETCore.csproj b/src/Hangfire.Mongo.Sample.NETCore/Hangfire.Mongo.Sample.NETCore.csproj index 612a395..77c72ba 100644 --- a/src/Hangfire.Mongo.Sample.NETCore/Hangfire.Mongo.Sample.NETCore.csproj +++ b/src/Hangfire.Mongo.Sample.NETCore/Hangfire.Mongo.Sample.NETCore.csproj @@ -1,10 +1,9 @@ - net6.0 + net8.0 Hangfire.Mongo.Sample.NETCore Exe Hangfire.Mongo.Sample.NETCore - 1.10.8 MongoDB storage implementation for Hangfire (background job system for ASP.NET applications). Copyright © 2014-2019 Sergey Zwezdin, Martin Lobger, Jonas Gottschau Sergey Zwezdin, Martin Lobger, Jonas Gottschau diff --git a/src/Hangfire.Mongo.Tests/Hangfire.Mongo.Tests.csproj b/src/Hangfire.Mongo.Tests/Hangfire.Mongo.Tests.csproj index 1211f3e..6bd6ff4 100644 --- a/src/Hangfire.Mongo.Tests/Hangfire.Mongo.Tests.csproj +++ b/src/Hangfire.Mongo.Tests/Hangfire.Mongo.Tests.csproj @@ -1,6 +1,6 @@ - net6.0 + net8.0 $(NoWarn);CS0618 true Hangfire.Mongo.Tests @@ -15,7 +15,7 @@ false false false - latestmajor + default diff --git a/src/Hangfire.Mongo.sln b/src/Hangfire.Mongo.sln index f5a3198..ed23835 100644 --- a/src/Hangfire.Mongo.sln +++ b/src/Hangfire.Mongo.sln @@ -24,6 +24,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hangfire.Mongo.Sample.NETCo EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hangfire.Mongo.Sample.CosmosDB", "Hangfire.Mongo.Sample.CosmosDB\Hangfire.Mongo.Sample.CosmosDB.csproj", "{C38EF6CE-0747-4E1C-9798-31E642C8CECA}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "actions", "actions", "{229BFA73-BF01-43B4-842D-D09E878D85F6}" + ProjectSection(SolutionItems) = preProject + ..\.github\workflows\build.yml = ..\.github\workflows\build.yml + ..\.github\workflows\release.yml = ..\.github\workflows\release.yml + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/Hangfire.Mongo/Hangfire.Mongo.csproj b/src/Hangfire.Mongo/Hangfire.Mongo.csproj index 1c83df8..525a7ee 100644 --- a/src/Hangfire.Mongo/Hangfire.Mongo.csproj +++ b/src/Hangfire.Mongo/Hangfire.Mongo.csproj @@ -1,21 +1,11 @@ - 1.10.8 netstandard2.0 $(NoWarn);CS0618 true true Hangfire.Mongo Hangfire.Mongo - false - false - false - false - false - false - false - false - false True Hangfire MongoDB Storage Sergey Zwezdin, Jonas Gottschau @@ -28,7 +18,7 @@ https://github.com/sergeyzwezdin/Hangfire.Mongo Sergey Zwezdin, Martin Lobger, Jonas Gottschau - latestmajor + default @@ -37,4 +27,9 @@ + + + <_Parameter1>Hangfire.Mongo.Tests + + diff --git a/src/Hangfire.Mongo/Properties/AssemblyInfo.cs b/src/Hangfire.Mongo/Properties/AssemblyInfo.cs deleted file mode 100644 index bf3479a..0000000 --- a/src/Hangfire.Mongo/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Hangfire.Mongo")] -[assembly: AssemblyDescription("MongoDB storage implementation for Hangfire (background job system for ASP.NET applications).")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Hangfire.Mongo")] -[assembly: AssemblyCopyright("Copyright © 2014-2019 Sergey Zwezdin, Martin Lobger, Jonas Gottschau")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("02c80b18-125e-473f-be8b-f50dcd86396b")] -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.7.28")] -[assembly: AssemblyFileVersion("0.7.28")] -[assembly: AssemblyInformationalVersion("0.7.28")] -[assembly: InternalsVisibleTo("Hangfire.Mongo.Tests")] -[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]