Skip to content

Commit c32362e

Browse files
committed
Publish Package workflow
1 parent 2abe1ad commit c32362e

File tree

4 files changed

+79
-29
lines changed

4 files changed

+79
-29
lines changed

.config/dotnet-tools.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"dotnet-reportgenerator-globaltool": {
6+
"version": "5.4.7",
7+
"commands": [
8+
"reportgenerator"
9+
],
10+
"rollForward": false
11+
}
12+
}
13+
}

.github/workflows/dotnet.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Publishes beta-versions only
2+
name: Publish Package
3+
on:
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
dotnet-version: [ '8.0', '9.0' ]
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
- name: Setup .NET ${{ matrix.dotnet-version }}
17+
uses: actions/setup-dotnet@v3
18+
with:
19+
dotnet-version: ${{ matrix.dotnet-version }}.x
20+
- name: .NET Info
21+
run: dotnet --info
22+
- name: Restore
23+
run: dotnet restore ./Ocelot.Administration.IdentityServer4.sln -p:TargetFramework=net${{ matrix.dotnet-version }}
24+
- name: Build
25+
run: dotnet build --no-restore ./Ocelot.Administration.IdentityServer4.sln --framework net${{ matrix.dotnet-version }}
26+
- name: Unit Tests
27+
run: dotnet test --no-restore --no-build --collect:"XPlat Code Coverage" --framework net${{ matrix.dotnet-version }} ./unit/Ocelot.Administration.IdentityServer4.UnitTests.csproj
28+
- name: Acceptance Tests
29+
run: dotnet test --no-restore --no-build --verbosity minimal --framework net${{ matrix.dotnet-version }} ./acceptance/Ocelot.Administration.IdentityServer4.AcceptanceTests.csproj
30+
- name: Report generator
31+
run: dotnet tool run reportgenerator
32+
33+
# build2:
34+
# runs-on: ubuntu-latest
35+
# permissions:
36+
# packages: write
37+
# contents: read
38+
# steps:
39+
# - name: Checkout repository
40+
# uses: actions/checkout@v4
41+
42+
# - name: Setup .NET
43+
# uses: actions/setup-dotnet@v4
44+
# with:
45+
# dotnet-version: |
46+
# 8.0.x
47+
# 9.0.x
48+
49+
# - name: .NET Info
50+
# run: dotnet --info
51+
52+
# - name: Restore dependencies
53+
# run: dotnet restore ./Ocelot.Administration.IdentityServer4.sln
54+
55+
# - name: Build project
56+
# run: dotnet build ./src/Ocelot.Testing.csproj --configuration Release --no-restore
57+
58+
# - name: Pack project
59+
# run: dotnet pack ./src/Ocelot.Testing.csproj --configuration Release --output ./packages
60+
61+
# - name: Publish to GitHub Packages
62+
# run: dotnet nuget push ./packages/*.nupkg --source "https://nuget.pkg.github.com/ThreeMammals/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
63+
64+
# - name: Publish to NuGet
65+
# run: dotnet nuget push ./packages/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{ secrets.NUGET_API_KEY_2025 }} --skip-duplicate

unit/Ocelot.Administration.IdentityServer4.UnitTests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<PrivateAssets>all</PrivateAssets>
1515
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1616
</PackageReference>
17+
<PackageReference Include="ReportGenerator.Core" Version="5.4.7" />
1718
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
1819
<PackageReference Include="Moq" Version="4.20.72" />
1920
<PackageReference Include="xunit" Version="2.9.3" />

0 commit comments

Comments
 (0)