Skip to content

Commit

Permalink
.net6 upgrade (#1)
Browse files Browse the repository at this point in the history
* upgrade to net6.0

* add github action

* run gh action on master & pr

* remove appveyor

* Update action versions

* Update ImageSharp dependency to version 2.1.6�

The (beta) version of ImageSharp that has been used is not able to open the PNG
image with .NET 6. Thus updating to a more recent version fixing this.

---------

Co-authored-by: Bernhard Dick <[email protected]>
  • Loading branch information
zivillian and bernharddick authored Jan 26, 2024
1 parent c27ce56 commit 3fd791f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/dotnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: dotnet publish workflow
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0'
- run: 'dotnet restore'
- run: 'dotnet publish -o publish -c Release src/grafana-logo.csproj'
- name: Upload result
uses: actions/upload-artifact@v4
with:
name: publish
path: publish
21 changes: 0 additions & 21 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion src/Controllers/HomeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class HomeController:Controller
private static ConcurrentDictionary<string, Logo> _logos = new ConcurrentDictionary<string, Logo>();
private readonly string _root;

public HomeController(IHostingEnvironment hostingEnvironment)
public HomeController(IWebHostEnvironment hostingEnvironment)
{
_root = Path.Combine(hostingEnvironment.WebRootPath, "images");
}
Expand Down
4 changes: 2 additions & 2 deletions src/grafana-logo.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>eventphone.grafanalogo</RootNamespace>
</PropertyGroup>

Expand All @@ -10,7 +10,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-beta0007" />
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.6" />
</ItemGroup>

</Project>

0 comments on commit 3fd791f

Please sign in to comment.