Skip to content

Commit 862c30a

Browse files
committed
fix: update dependencies and enhance automation of releases
Modified the release workflow to enhance automation and updated various package versions across the project. Added new configuration files for release management and improved the build process.
1 parent 90c92ed commit 862c30a

File tree

11 files changed

+82
-48
lines changed

11 files changed

+82
-48
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "3.0.4"
3+
}

.github/release-please-config.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/refs/heads/main/schemas/config.json",
3+
"packages": {
4+
".": {
5+
"release-type": "simple"
6+
}
7+
}
8+
}

.github/workflows/publish.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build and release
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
build:
10+
name: Build and release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Setup .NET 9
16+
uses: actions/setup-dotnet@v4
17+
with:
18+
dotnet-version: 9.0.*
19+
20+
- name: Restore dotnet
21+
run: dotnet restore
22+
23+
- name: Build dotnet
24+
run: dotnet build --no-restore
25+
26+
- name: Docker meta
27+
id: meta
28+
uses: docker/metadata-action@v5
29+
with:
30+
flavor: |
31+
latest=false
32+
sep-tags: ";"
33+
tags: |
34+
type=ref,event=branch
35+
type=semver,pattern={{version}}
36+
37+
- name: Pack .NET project
38+
run: dotnet pack Intility.Logging.sln -o Intility.Logging/output --property:Version=${{ steps.meta.outputs.tags }}
39+
40+
- name: Publish to NuGet
41+
run: dotnet nuget push Intility.Logging/output/*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

.github/workflows/release.yaml

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,25 @@
1-
name: Build and release
1+
name: Release Please
22

33
on:
44
push:
5-
tags:
6-
- v*
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
711

812
jobs:
9-
build:
10-
name: Build and release
13+
release-please:
1114
runs-on: ubuntu-latest
1215
steps:
13-
- uses: actions/checkout@v4
14-
15-
- name: Setup .NET 9
16-
uses: actions/setup-dotnet@v4
16+
- uses: actions/create-github-app-token@v2
17+
id: app-token
1718
with:
18-
dotnet-version: 9.0.*
19-
20-
- name: Restore dotnet
21-
run: dotnet restore
22-
23-
- name: Build dotnet
24-
run: dotnet build --no-restore
25-
26-
- name: Docker meta
27-
id: meta
28-
uses: docker/metadata-action@v5
19+
app-id: ${{ vars.RELEASE_BOT_APP_ID }}
20+
private-key: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
21+
- uses: googleapis/release-please-action@v4
2922
with:
30-
flavor: |
31-
latest=false
32-
sep-tags: ";"
33-
tags: |
34-
type=ref,event=branch
35-
type=semver,pattern={{version}}
36-
37-
- name: Pack .NET project
38-
run: dotnet pack Intility.Logging.sln -o Intility.Logging/output --property:Version=${{ steps.meta.outputs.tags }}
39-
40-
- name: Publish to NuGet
41-
run: dotnet nuget push Intility.Logging/output/*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
23+
token: ${{ steps.app-token.outputs.token }}
24+
config-file: ".github/release-please-config.json"
25+
manifest-file: ".github/.release-please-manifest.json"

samples/MinimalApiSample/MinimalApiSample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Swashbuckle.AspNetCore" Version="8.1.1" />
10+
<PackageReference Include="Swashbuckle.AspNetCore" Version="9.0.1" />
1111
<ProjectReference Include="..\..\src\Intility.Extensions.Logging.Elasticsearch\Intility.Extensions.Logging.Elasticsearch.csproj" />
1212
<ProjectReference Include="..\..\src\Intility.Extensions.Logging.Sentry\Intility.Extensions.Logging.Sentry.csproj" />
1313
<ProjectReference Include="..\..\src\Intility.Logging.AspNetCore\Intility.Logging.AspNetCore.csproj" />
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Worker">
1+
<Project Sdk="Microsoft.NET.Sdk.Worker">
22

33
<PropertyGroup>
44
<TargetFramework>net9.0</TargetFramework>
55
<UserSecretsId>dotnet-WorkerSample-E1FD34C8-B239-4D87-8143-0BA5129DDB52</UserSecretsId>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.4" />
10-
<PackageReference Include="Serilog.Enrichers.AzureClaims" Version="1.1.3" />
9+
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.6" />
1110
</ItemGroup>
1211

1312
<ItemGroup>
1413
<ProjectReference Include="..\..\src\Intility.Extensions.Logging.Sentry\Intility.Extensions.Logging.Sentry.csproj" />
1514
<ProjectReference Include="..\..\src\Intility.Logging.AspNetCore\Intility.Logging.AspNetCore.csproj" />
1615
</ItemGroup>
1716
</Project>
18-

src/Intility.Extensions.Logging.Elasticsearch/Intility.Extensions.Logging.Elasticsearch.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</ItemGroup>
2929

3030
<ItemGroup>
31-
<PackageReference Include="Elastic.Serilog.Sinks" Version="8.12.3" />
31+
<PackageReference Include="Elastic.Serilog.Sinks" Version="8.18.2" />
3232
</ItemGroup>
3333

3434
</Project>

src/Intility.Extensions.Logging.Elasticsearch/LoggerBuilderExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public static ILoggerBuilder UseElasticsearch(this ILoggerBuilder builder, strin
7979
$"Exception={channel.ObservedException}"
8080
);
8181
},
82-
TextFormatting = new EcsTextFormatterConfiguration()
82+
TextFormatting = new EcsTextFormatterConfiguration<LogEventEcsDocument>()
8383
};
8484

8585
if (!string.IsNullOrWhiteSpace(llmPolicy))

src/Intility.Extensions.Logging.Sentry/Intility.Extensions.Logging.Sentry.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
</PropertyGroup>
2121

2222
<ItemGroup>
23-
<PackageReference Include="Sentry.AspNetCore" Version="5.6.0" />
24-
<PackageReference Include="Sentry.Serilog" Version="5.6.0" />
23+
<PackageReference Include="Sentry.AspNetCore" Version="5.11.2" />
24+
<PackageReference Include="Sentry.Serilog" Version="5.11.2" />
2525
</ItemGroup>
2626

2727
<ItemGroup>

src/Intility.Extensions.Logging/Intility.Extensions.Logging.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
@@ -21,15 +21,15 @@
2121
</PropertyGroup>
2222

2323
<ItemGroup>
24-
<PackageReference Include="Serilog" Version="4.2.0" />
24+
<PackageReference Include="Serilog" Version="4.3.0" />
2525
</ItemGroup>
2626

2727
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
2828
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
2929
</ItemGroup>
3030

3131
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
32-
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.4" />
32+
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.6" />
3333
</ItemGroup>
3434

3535
<ItemGroup>

0 commit comments

Comments
 (0)