Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,38 @@ on: [ "push", "pull_request" ]

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

permissions:
id-token: write

steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/checkout@v7

- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v5
with:
dotnet-version: 7.x
dotnet-version: 8.x

- name: Run the Cake script
uses: cake-build/cake-action@94fa55b4f83cee90f2621654eba6a056ae71df90
uses: cake-build/cake-action@v3
with:
verbosity: Diagnostic

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v7
with:
name: nuget packages
path: ./*/bin/Release*/*.nupkg

# Use NuGet trusted publishing: https://learn.microsoft.com/en-us/nuget/nuget-org/trusted-publishing
- name: NuGet login
uses: NuGet/login@v1
id: login
if: github.ref_type == 'tag'
with:
user: "${{ secrets.NUGET_USER }}"

- name: Push NuGet package
if: github.ref_type == 'tag'
run: |
dotnet nuget push ./{Hazel,Impostor.Hazel.Abstractions}/bin/Release/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }}
dotnet nuget push ./{Hazel,Impostor.Hazel.Abstractions}/bin/Release/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ steps.login.outputs.NUGET_API_KEY }}
8 changes: 4 additions & 4 deletions Hazel/Hazel.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<DefineConstants>HAZEL_BAG</DefineConstants>
<RootNamespace>Impostor.Hazel</RootNamespace>
<AssemblyName>Impostor.Hazel</AssemblyName>
Expand All @@ -16,8 +16,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="8.0.0" />
<PackageReference Include="Serilog" Version="2.12.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down
2 changes: 1 addition & 1 deletion Impostor.Hazel.Tests/Impostor.Hazel.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand Down
Loading