Skip to content

Commit

Permalink
Update workflows to set assembly version (#409)
Browse files Browse the repository at this point in the history
target net8
  • Loading branch information
gottscj authored Oct 3, 2024
1 parent 2d79553 commit 85965ab
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Description />
<Version>1.10.8</Version>
<Description>MongoDB storage implementation for Hangfire (background job system for ASP.NET applications).</Description>
<Copyright>Copyright © 2014-2019 Sergey Zwezdin, Martin Lobger, Jonas Gottschau</Copyright>
<Authors>Sergey Zwezdin, Martin Lobger, Jonas Gottschau</Authors>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Description />
<Version>1.10.8</Version>
<Description>MongoDB storage implementation for Hangfire (background job system for ASP.NET applications).</Description>
<Copyright>Copyright © 2014-2019 Sergey Zwezdin, Martin Lobger, Jonas Gottschau</Copyright>
<Authors>Sergey Zwezdin, Martin Lobger, Jonas Gottschau</Authors>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Hangfire.Mongo.Sample.NETCore</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>Hangfire.Mongo.Sample.NETCore</PackageId>
<Version>1.10.8</Version>
<Description>MongoDB storage implementation for Hangfire (background job system for ASP.NET applications).</Description>
<Copyright>Copyright © 2014-2019 Sergey Zwezdin, Martin Lobger, Jonas Gottschau</Copyright>
<Authors>Sergey Zwezdin, Martin Lobger, Jonas Gottschau</Authors>
Expand Down
4 changes: 2 additions & 2 deletions src/Hangfire.Mongo.Tests/Hangfire.Mongo.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<NoWarn>$(NoWarn);CS0618</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AssemblyName>Hangfire.Mongo.Tests</AssemblyName>
Expand All @@ -15,7 +15,7 @@
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<LangVersion>latestmajor</LangVersion>
<LangVersion>default</LangVersion>
</PropertyGroup>
<ItemGroup>
<None Include="README.md" />
Expand Down
6 changes: 6 additions & 0 deletions src/Hangfire.Mongo.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 6 additions & 11 deletions src/Hangfire.Mongo/Hangfire.Mongo.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<VersionPrefix>1.10.8</VersionPrefix>
<TargetFramework>netstandard2.0</TargetFramework>
<NoWarn>$(NoWarn);CS0618</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Hangfire.Mongo</AssemblyName>
<PackageId>Hangfire.Mongo</PackageId>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<title>Hangfire MongoDB Storage</title>
<owners>Sergey Zwezdin, Jonas Gottschau</owners>
Expand All @@ -28,7 +18,7 @@
<!--<PackageLicenseUrl>https://raw.githubusercontent.com/sergun/Hangfire.Mongo/master/LICENSE</PackageLicenseUrl>-->
<PackageProjectUrl>https://github.com/sergeyzwezdin/Hangfire.Mongo</PackageProjectUrl>
<Authors>Sergey Zwezdin, Martin Lobger, Jonas Gottschau</Authors>
<LangVersion>latestmajor</LangVersion>
<LangVersion>default</LangVersion>
</PropertyGroup>
<ItemGroup>
<None Include="../../README.md" pack="true" PackagePath="." />
Expand All @@ -37,4 +27,9 @@
<PackageReference Include="Hangfire.Core" Version="1.8.14" />
<PackageReference Include="MongoDB.Driver" Version="2.28.0" />
</ItemGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1>Hangfire.Mongo.Tests</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
</Project>
36 changes: 0 additions & 36 deletions src/Hangfire.Mongo/Properties/AssemblyInfo.cs

This file was deleted.

0 comments on commit 85965ab

Please sign in to comment.