Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
94e5720
build: retarget MaxLib.WebServer to net10.0;net8.0
Garados007 Aug 11, 2026
618e577
fix: distinguish a closed connection from a literal 0x00 first byte i…
Garados007 Aug 11, 2026
219d2f8
build: retarget test and example projects to net10.0
Garados007 Aug 11, 2026
4109b0d
ci: build and pack against the .NET 10 SDK
Garados007 Aug 11, 2026
cedd6c5
fix: remove redundant default-value initializers and a stringly-typed…
Garados007 Aug 11, 2026
85ae9f2
fix: modernize argument-validation throws and fix wrong paramName usa…
Garados007 Aug 11, 2026
8d33ff9
fix: call GC.SuppressFinalize in all Dispose/DisposeAsync implementat…
Garados007 Aug 11, 2026
8877f46
fix: dispose the objects CA2000 can safely dispose, leave the rest do…
Garados007 Aug 11, 2026
4c64ab1
fix: validate reference-type arguments before use across the public A…
Garados007 Aug 11, 2026
5943dfa
fix: use explicit ordinal comparisons for protocol/header string pars…
Garados007 Aug 11, 2026
1c518c3
fix: replace locale-dependent ToLower() comparisons with ordinal equa…
Garados007 Aug 11, 2026
3159db9
fix: specify InvariantCulture for locale-independent formatting (CA1305)
Garados007 Aug 11, 2026
692c144
fix: await protocol/response code with ConfigureAwait, replace sync-b…
Garados007 Aug 11, 2026
bd0f23e
fix: avoid zero-length/constant array allocations and redundant colle…
Garados007 Aug 11, 2026
2285de8
fix: add a Memory<byte> ReadAsync override and use memory-based strea…
Garados007 Aug 11, 2026
bedcd75
fix: use C# 12 collection expressions for array/empty-collection lite…
Garados007 Aug 11, 2026
6c74c26
fix: use the range operator instead of Remove/Substring pairs (IDE0057)
Garados007 Aug 11, 2026
52ea993
fix: generate regex implementations at compile time instead of at run…
Garados007 Aug 11, 2026
9a10dc5
fix: use pattern matching instead of an 'is' check plus a separate ca…
Garados007 Aug 12, 2026
fe142b2
fix: remove unused using directives (IDE0005)
Garados007 Aug 12, 2026
fea2d32
Merge branch 'feature/dotnet10-migration' into version-5
Garados007 Aug 12, 2026
5c8e23b
fix: correct char-count drift and premature EOF in NetworkReader line…
Garados007 Aug 12, 2026
656a192
test: add edge case tests for malicious/malformed NetworkReader input
Garados007 Aug 12, 2026
9044128
test: bring NetworkReader to full line/branch coverage
Garados007 Aug 12, 2026
c2b1de1
Merge branch 'bugfix/18-broken-headers' into version-5
Garados007 Aug 12, 2026
521b0e1
feat: replace custom logging system with Microsoft.Extensions.Logging
Garados007 Aug 13, 2026
49080c7
Merge branch 'logging-system' into version-5
Garados007 Aug 13, 2026
96a7a36
feat!: remove obsolete Api.Rest subsystem and StandardDocumentLoader
Garados007 Aug 13, 2026
8da0b09
Merge branch 'remove-deprecated-code' into version-5
Garados007 Aug 13, 2026
7830c74
CI: Add coverage report generation
Garados007 Aug 21, 2026
ef2234b
Merge branch 'coverage-reports' into version-5
Garados007 Aug 21, 2026
73353fa
WebSocket: Use System.Text.Json polymorphic serialization instead of …
Garados007 Aug 22, 2026
9e94a87
Merge branch 'json-serializer' into version-5
Garados007 Aug 22, 2026
b55cf74
Fix net8.0 build: System.Threading.Lock is not available before net9.0
Garados007 Aug 23, 2026
480c793
Builder: Add ToString() overrides to all Builder attributes
Garados007 Aug 24, 2026
64041a6
Add structured BuildReport diagnostics to the Builder generator
Garados007 Aug 24, 2026
86e4cae
Add a read-only request-routing dry-run to the Builder debugger
Garados007 Aug 24, 2026
e7906c1
Add an opt-in DebuggerService web UI for build/routing diagnostics
Garados007 Aug 24, 2026
2781b1e
Add an example project demonstrating the Builder debugger in practice
Garados007 Aug 24, 2026
c07844a
Merge branch 'http-builder-debugger' into version-5
Garados007 Aug 24, 2026
9f23786
GetVolumeString: Fix data volume prefixes to use IEC units instead of…
Garados007 Aug 26, 2026
0162454
Merge branch 'fix/iec-volume-prefixes' into version-5
Garados007 Aug 27, 2026
6e0b6a3
MaxLib.WebServer.Remote: deprecate it
Garados007 Aug 27, 2026
196093f
Merge branch 'deprecate-remote' into version-5
Garados007 Aug 27, 2026
4c18327
CI: fix GitHub Actions workflows
Garados007 Aug 27, 2026
c551920
Merge branch 'fix-ci' into version-5
Garados007 Aug 27, 2026
501e434
WebSocket: Add handling for invalid incoming events
Garados007 Aug 27, 2026
261f85d
Merge branch 'websocket-error-handling' into version-5
Garados007 Aug 27, 2026
d45322f
Security: reject path segments that can escape LocalIOMapper's base dir
Garados007 Aug 27, 2026
b4ff3f4
Merge branch 'fix-localiomapper-path-traversal' into version-5
Garados007 Aug 27, 2026
4dd9bf3
Security: generate session keys with a CSPRNG instead of System.Random
Garados007 Aug 27, 2026
6fca57c
Merge branch 'fix-session-id-weak-rng' into version-5
Garados007 Aug 27, 2026
746257b
Security: reject session fixation via client-supplied session ids
Garados007 Aug 27, 2026
1c92e29
Merge branch 'fix-session-fixation' into version-5
Garados007 Aug 27, 2026
6ec67ac
Security: reject Transfer-Encoding requests (TE.CL smuggling mitigation)
Garados007 Aug 27, 2026
74a6632
Merge branch 'fix-transfer-encoding-smuggling' into version-5
Garados007 Aug 27, 2026
6046fd3
Fix: strip the boundary delimiter's CRLF from multipart part content
Garados007 Aug 27, 2026
317d30c
Merge branch 'fix-multipart-trailing-crlf' into version-5
Garados007 Aug 27, 2026
b3e543d
Fix: delete multipart temp files on FormEntry disposal
Garados007 Aug 27, 2026
473a568
Merge branch 'fix-multipart-tempfile-leak' into version-5
Garados007 Aug 27, 2026
76eae86
Security: bound request body size/timeout, make dispose-drain async
Garados007 Aug 27, 2026
817d58b
Merge branch 'fix-threadpool-exhaustion-dispose' into version-5
Garados007 Aug 28, 2026
0fa0f73
Fix: always clean up a connection after an unhandled exception
Garados007 Aug 28, 2026
e15c523
Readme: Move advanced chapters to the advanced usage section
Garados007 Sep 3, 2026
c02b514
Merge branch 'fix-unhandled-exception-leaks-connection' into version-5
Garados007 Sep 3, 2026
1eeee9d
Fix: missing return after oversized fragment rejection crashes the re…
Garados007 Sep 3, 2026
62689f8
Merge branch 'fix-ws-fragment-reassembly-overflow-crash' into version-5
Garados007 Sep 3, 2026
d6cadaf
Readme: drop dangling reference to a removed section
Garados007 Sep 3, 2026
c1dbcb6
Merge branch 'docs-drop-stale-protocol-limitations-reference' into ve…
Garados007 Sep 7, 2026
d002e99
Security: add HttpOnly/Secure/SameSite cookie support, use it for ses…
Garados007 Sep 3, 2026
f627e7c
Merge branch 'fix-sec-cookie-missing-security-flags' into version-5
Garados007 Sep 7, 2026
cd826d4
Fix: WebSocket SendFrame leaks its send lock on a write IOException
Garados007 Sep 7, 2026
f21c5cc
Security: enforce RFC 6455's client-frames-must-be-masked rule
Garados007 Sep 7, 2026
5a8d6b8
Fix: 3+ fragment WebSocket messages reassembled with the wrong opcode
Garados007 Sep 7, 2026
429c31d
Fix: TooLargePayloadException could never actually be thrown
Garados007 Sep 7, 2026
bc1aefa
Security: bound accumulated fragment count/size during reassembly
Garados007 Sep 7, 2026
7ee333e
Fix: enforce the 125-byte WebSocket control-frame payload cap
Garados007 Sep 7, 2026
d35546f
Fix: WebSocketEndpoint never disposes a connection once it closes
Garados007 Sep 7, 2026
3030794
Fix: Frame.Write never sets the mask-present bit for a masked frame
Garados007 Sep 7, 2026
4ae9669
Merge branch 'websocket-fixes' into version-5
Garados007 Sep 7, 2026
f5fb9dc
Fix: HttpLocation.SetLocation's malformed-URL fallback was dead code
Garados007 Sep 7, 2026
af41bdb
Security: reject responses with an unknown-length source and no chunk…
Garados007 Sep 7, 2026
3c81570
Security: strip CRLF at the header-writing sink and in Cookie.Path
Garados007 Sep 7, 2026
2450652
Fix: add a configurable cap on concurrent connections
Garados007 Sep 7, 2026
d0848c5
Security: bound the entire header-reading phase, not just the first byte
Garados007 Sep 7, 2026
28805a9
Merge branch 'http-fixes' into version-5
Garados007 Sep 7, 2026
ac86314
Fix: reject multipart requests with a missing or empty boundary
Garados007 Sep 7, 2026
22b58a6
Security: cap the number of parts a multipart body may contain
Garados007 Sep 7, 2026
d6a1353
Fix: read and store the body for unrecognized POST content types
Garados007 Sep 7, 2026
c8391c0
Security: bound memory use for large url-encoded request bodies
Garados007 Sep 8, 2026
ea0a4e9
Fix: skip content generation after rejecting a malformed multipart body
Garados007 Sep 8, 2026
b25a10a
Fix: fetch mime-type list over HTTPS instead of plaintext HTTP
Garados007 Sep 8, 2026
338fca8
Merge branch 'post-fixes' into version-5
Garados007 Sep 8, 2026
be5c28f
Fix: HttpException from Builder parameter binding or a sync handler d…
Garados007 Sep 8, 2026
07dc14b
Fix: make Builder route resolution order deterministic by path specif…
Garados007 Sep 8, 2026
73f95fe
Merge branch 'builder-fixes' into version-5
Garados007 Sep 8, 2026
9110270
Security: expire sessions server-side and evict them from MemorySessi…
Garados007 Sep 8, 2026
d80a2d1
Security: add a constant-time byte comparison alongside BytesEqual
Garados007 Sep 8, 2026
f871066
Merge branch 'sec-fixes' into version-5
Garados007 Sep 8, 2026
6e2dbdf
Security: bound and guard the TLS handshake and protocol peek
Garados007 Oct 2, 2026
d8e5217
Security: keep the accept loops running when accepting a client fails
Garados007 Oct 2, 2026
d2bd35b
Fix: process keep-alive connections reliably in every server mode
Garados007 Oct 2, 2026
81ddcd4
Fix: find NetworkReader markers that span a buffer refill
Garados007 Oct 2, 2026
faf25ec
Security: stop ContentStream discard from spinning on early EOF
Garados007 Oct 2, 2026
d153fca
Fix: read fixed-size WebSocket frames and POST bodies completely
Garados007 Oct 2, 2026
ae60b5d
Fix: make the HttpRequestHeader.Host setter usable
Garados007 Oct 2, 2026
c851b98
Fix: accept requests that repeat a header name
Garados007 Oct 2, 2026
e96e909
Security: remove catastrophic backtracking from the HttpLocation regex
Garados007 Oct 2, 2026
d03b3b0
Security: clean up POST temp files when parsing a body fails
Garados007 Oct 2, 2026
d390bf0
Fix: harden multipart boundary and part header parsing
Garados007 Oct 2, 2026
9259c97
Fix: match the POST Content-Type case-insensitively
Garados007 Oct 2, 2026
147e3f2
Fix: decode text POST bodies with their declared charset
Garados007 Oct 2, 2026
135ba5a
Fix: read UrlEncodedPost fields from overflowed bodies
Garados007 Oct 2, 2026
ae549f4
Security: always dispose request POST data after the response
Garados007 Oct 2, 2026
17033cb
Fix: log client disconnects in HttpSender as ordinary disconnects
Garados007 Oct 2, 2026
3a25ddb
Fix: run and terminate the background writer of streamed sources
Garados007 Oct 2, 2026
a2265f8
Fix: send correct Set-Cookie headers from ChunkedSender
Garados007 Oct 2, 2026
60cdb20
Fix: keep Http404Service from reading the request body
Garados007 Oct 2, 2026
fc0885b
Fix: correct byte counts and validation of HTTP range requests
Garados007 Oct 2, 2026
9a5bf0a
Fix: count bytes correctly for a nested HttpPartialSource
Garados007 Oct 2, 2026
6bf5a28
Fix: stop HttpStreamDataSource reading past the requested range
Garados007 Oct 2, 2026
7f617a1
Fix: report JSON converter errors and release JSON resources
Garados007 Oct 2, 2026
9d8ebf5
Fix: report conversion failures in the routing debugger dry run
Garados007 Oct 2, 2026
0e3019c
Security: require the full template length for a Prefix PathAttribute
Garados007 Oct 2, 2026
ce279a9
Fix: convert enum-typed Builder parameters
Garados007 Oct 2, 2026
e117072
Security: close session fixation gaps in session key handling
Garados007 Oct 2, 2026
65f3473
Fix: keep the MemorySessionService sweep alive for a long MaxAge
Garados007 Oct 2, 2026
f9afda5
Security: use a random masking key in Frame.ApplyMask
Garados007 Oct 2, 2026
de2a1b9
Fix: enforce RFC 6455 frame rules in WebSocketConnection
Garados007 Oct 2, 2026
fd5f200
Fix: select WebSocket endpoints by subprotocol correctly
Garados007 Oct 2, 2026
7493a45
Fix: parse WebSocket events regardless of the "$type" position
Garados007 Oct 2, 2026
dae8a84
Fix nullable-annotation compiler warning in two WebSocket test files
Garados007 Oct 2, 2026
b168cbd
Document thread-safety, caller-misuse and exception-contract limits
Garados007 Oct 2, 2026
4fc3919
Merge branch 'various-fixes' into version-5
Garados007 Oct 2, 2026
0983367
Document thread-safety and usage constraints
Garados007 Oct 2, 2026
e83fba4
Merge branch 'docs/api-notes' into version-5
Garados007 Oct 2, 2026
b19f7d5
Nuget: Use trusted publishing workflow
Garados007 Oct 3, 2026
1e11948
CI: remove generated code from coverage reports
Garados007 Oct 3, 2026
bcb228a
Bump version to 5.0.0
Garados007 Oct 3, 2026
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
13 changes: 13 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-reportgenerator-globaltool": {
"version": "5.5.11",
"commands": [
"reportgenerator"
],
"rollForward": false
}
}
}
105 changes: 105 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,108 @@ dotnet_diagnostic.CS1570.severity = silent

# CS1591: Fehledes XML-Kommentar für öffentlich sichtbaren Typ oder Element
dotnet_diagnostic.CS1591.severity = silent

[MaxLib.WebServer/**.cs]

# CA1805: Do not initialize unnecessarily
dotnet_diagnostic.CA1805.severity = error

# CA1507: Use nameof to express symbol names
dotnet_diagnostic.CA1507.severity = error

# CA1510: Use ArgumentNullException throw helper
dotnet_diagnostic.CA1510.severity = error

# CA1512: Use ArgumentOutOfRangeException throw helper
dotnet_diagnostic.CA1512.severity = error

# CA1513: Use ObjectDisposedException throw helper
dotnet_diagnostic.CA1513.severity = error

# CA2208: Instantiate argument exceptions correctly
dotnet_diagnostic.CA2208.severity = error

# CA1816: Dispose methods should call SuppressFinalize
dotnet_diagnostic.CA1816.severity = error

# CA2000: Dispose objects before losing scope
dotnet_diagnostic.CA2000.severity = error

# CA1062: Validate arguments of public methods
dotnet_diagnostic.CA1062.severity = error

# CA1307: Specify StringComparison for clarity
dotnet_diagnostic.CA1307.severity = error

# CA1310: Specify StringComparison for correctness
dotnet_diagnostic.CA1310.severity = error

# CA1309: Use ordinal string comparison
dotnet_diagnostic.CA1309.severity = error

# CA1866: Use the 'StringComparison.Ordinal' char overload
dotnet_diagnostic.CA1866.severity = error

# CA1834: Use StringBuilder.Append(char) for single-character string literals
dotnet_diagnostic.CA1834.severity = error

# CA1820: Test for empty strings using string length instead of Equals("")
dotnet_diagnostic.CA1820.severity = error

# CA1304: Specify CultureInfo
dotnet_diagnostic.CA1304.severity = error

# CA1862: Use the 'StringComparison' method overloads for case-insensitive comparisons
dotnet_diagnostic.CA1862.severity = error

# CA1311: Specify a culture or use an invariant version to avoid implicit dependency on current culture
dotnet_diagnostic.CA1311.severity = error

# CA1305: Specify IFormatProvider
dotnet_diagnostic.CA1305.severity = error

# CA2007: Consider calling ConfigureAwait on the awaited task
dotnet_diagnostic.CA2007.severity = error

# CA1849: Call async methods when in an async method
dotnet_diagnostic.CA1849.severity = error

# CA1861: Avoid constant arrays as arguments
dotnet_diagnostic.CA1861.severity = error

# CA1825: Avoid zero-length array allocations
dotnet_diagnostic.CA1825.severity = error

# CA1864: Prefer the 'TryAdd' method
dotnet_diagnostic.CA1864.severity = error

# CA1868: Unnecessary call to 'Contains' for 'HashSet'/dictionary/list before Add/Remove
dotnet_diagnostic.CA1868.severity = error

# CA1822: Mark members as static
dotnet_diagnostic.CA1822.severity = error

# CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'
dotnet_diagnostic.CA1844.severity = error

# CA1835: Prefer the memory-based overloads for 'ReadAsync'/'WriteAsync'
dotnet_diagnostic.CA1835.severity = error

# IDE0300: Use collection expression for array
dotnet_diagnostic.IDE0300.severity = error

# IDE0301: Use collection expression for empty
dotnet_diagnostic.IDE0301.severity = error

# IDE0057: Use range operator
dotnet_diagnostic.IDE0057.severity = error

# SYSLIB1045: Use 'GeneratedRegexAttribute' to generate the regular expression
# implementation at compile-time
dotnet_diagnostic.SYSLIB1045.severity = error

# IDE0038: Use pattern matching to avoid 'is' check followed by a cast
dotnet_diagnostic.IDE0038.severity = error

# IDE0005: Remove unnecessary usings/imports
dotnet_diagnostic.IDE0005.severity = error
43 changes: 39 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@ jobs:
build:

runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
statuses: write

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
10.0
8.0
6.0.102
- name: Install dependencies
run: dotnet restore
- name: Build
Expand All @@ -30,10 +34,41 @@ jobs:
name: build-fail-artifact
path: ${{ github.workspace }}
- name: Test
run: dotnet test --no-restore
run: dotnet test --configuration Release --no-build --collect:"XPlat Code Coverage" --results-directory ./TestResults
- name: Upload Test Fail Artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-fail-artifact
path: ${{ github.workspace }}
- name: Restore .NET tools
run: dotnet tool restore
- name: Generate coverage report
run: >
dotnet tool run reportgenerator
"-reports:./TestResults/**/coverage.cobertura.xml"
-targetdir:./coveragereport
-reporttypes:"Html;MarkdownSummaryGithub;Badges;JsonSummary"
"-classfilters:+*;-System.Text.RegularExpressions.Generated*"
- name: Publish coverage summary
run: cat ./coveragereport/SummaryGithub.md >> "$GITHUB_STEP_SUMMARY"
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coveragereport
- name: Set coverage commit status
# GITHUB_TOKEN is read-only for pull_request events from forks, so this
# write would fail there regardless of the `statuses: write` permission above.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
env:
GH_TOKEN: ${{ github.token }}
run: |
LINE_COV=$(jq -r '.summary.linecoverage' ./coveragereport/Summary.json)
BRANCH_COV=$(jq -r '.summary.branchcoverage' ./coveragereport/Summary.json)
SHA="${{ github.event.pull_request.head.sha || github.sha }}"
gh api "repos/${{ github.repository }}/statuses/$SHA" \
-f state=success \
-f context="coverage" \
-f description="Line: ${LINE_COV}% · Branch: ${BRANCH_COV}%" \
-f target_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
114 changes: 104 additions & 10 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,122 @@
name: NuGet Publish
name: Release

# Release process:
# 1. Bump <Version> in MaxLib.WebServer/MaxLib.WebServer.csproj.include and push/merge to main
# 2. This workflow builds and tests the solution
# 3. It tags the commit as vX.Y.Z
# 4. It packs and publishes the package to NuGet.org
# 5. It creates a matching GitHub release
#
# Any other push to main (that doesn't change the version) only runs the
# check-version job and stops there - no tag, package or release is created.

on:
push:
branches: [ main ]

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false

permissions:
contents: read

jobs:
build:
check-version:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
changed: ${{ steps.diff.outputs.changed }}
version: ${{ steps.diff.outputs.version }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check if package version changed
id: diff
run: |
FILE=MaxLib.WebServer/MaxLib.WebServer.csproj.include
BEFORE_SHA="${{ github.event.before }}"

NEW=$(grep -oP '(?<=<Version>)[^<]+' "$FILE" | head -1)

OLD=""
if [ -n "$BEFORE_SHA" ] && [ "$BEFORE_SHA" != "0000000000000000000000000000000000000000" ] && git cat-file -e "$BEFORE_SHA" 2>/dev/null; then
OLD=$(git show "$BEFORE_SHA:$FILE" 2>/dev/null | grep -oP '(?<=<Version>)[^<]+' | head -1 || true)
fi

echo "Previous version: '$OLD', new version: '$NEW'"
if [ -n "$NEW" ] && [ "$NEW" != "$OLD" ]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
else
echo "changed=false" >> "$GITHUB_OUTPUT"
fi
echo "version=$NEW" >> "$GITHUB_OUTPUT"

release:
needs: check-version
if: needs.check-version.outputs.changed == 'true'
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: write
id-token: write # enable GitHub OIDC token issuance for this job

- name: Init git submodules
run: git submodule init && git submodule update
steps:
- uses: actions/checkout@v4

- name: Setup .NET Core
uses: actions/setup-dotnet@v1
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0'
dotnet-version: |
10.0
8.0

- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test --configuration Release --no-restore --no-build

- name: Create NuGet package
run: dotnet pack MaxLib.WebServer/MaxLib.WebServer.csproj
run: dotnet pack MaxLib.WebServer/MaxLib.WebServer.csproj --configuration Release --no-build --output ./nupkg

- name: Tag release
env:
VERSION: ${{ needs.check-version.outputs.version }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
if git ls-remote --exit-code --tags origin "refs/tags/v$VERSION" >/dev/null 2>&1; then
echo "Tag v$VERSION already exists, skipping"
else
git tag "v$VERSION"
git push origin "v$VERSION"
fi

- name: NuGet login (OIDC -> temp API key)
uses: NuGet/login@v1
id: login
with:
user: ${{ secrets.NUGET_USER }}

- name: Publish to NuGet.org
run: dotnet nuget push "**/*.nupkg" --api-key ${{ secrets.NUGET_PUSH_KEY }} --source "https://api.nuget.org/v3/index.json"
run: dotnet nuget push "./nupkg/*.nupkg" --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source "https://api.nuget.org/v3/index.json" --skip-duplicate

- name: Create GitHub release
env:
GH_TOKEN: ${{ github.token }}
VERSION: ${{ needs.check-version.outputs.version }}
run: |
if gh release view "v$VERSION" >/dev/null 2>&1; then
echo "Release v$VERSION already exists, skipping"
else
gh release create "v$VERSION" ./nupkg/*.nupkg \
--title "v$VERSION" \
--generate-notes
fi
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
bin
obj
TestResults
coveragereport
# vscode files
.vscode
# under development
Expand Down
15 changes: 15 additions & 0 deletions MaxLib.WebServer.sln
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaxLib.WebServer.Builder.Debugger.Example", "example\MaxLib.WebServer.Builder.Debugger.Example\MaxLib.WebServer.Builder.Debugger.Example.csproj", "{C1C6D975-A634-409F-87DE-521A45DF775F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -76,13 +78,26 @@ Global
{01C302FF-8E99-4D54-8234-D4BA59862176}.Release|x64.Build.0 = Release|Any CPU
{01C302FF-8E99-4D54-8234-D4BA59862176}.Release|x86.ActiveCfg = Release|Any CPU
{01C302FF-8E99-4D54-8234-D4BA59862176}.Release|x86.Build.0 = Release|Any CPU
{C1C6D975-A634-409F-87DE-521A45DF775F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C1C6D975-A634-409F-87DE-521A45DF775F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C1C6D975-A634-409F-87DE-521A45DF775F}.Debug|x64.ActiveCfg = Debug|Any CPU
{C1C6D975-A634-409F-87DE-521A45DF775F}.Debug|x64.Build.0 = Debug|Any CPU
{C1C6D975-A634-409F-87DE-521A45DF775F}.Debug|x86.ActiveCfg = Debug|Any CPU
{C1C6D975-A634-409F-87DE-521A45DF775F}.Debug|x86.Build.0 = Debug|Any CPU
{C1C6D975-A634-409F-87DE-521A45DF775F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C1C6D975-A634-409F-87DE-521A45DF775F}.Release|Any CPU.Build.0 = Release|Any CPU
{C1C6D975-A634-409F-87DE-521A45DF775F}.Release|x64.ActiveCfg = Release|Any CPU
{C1C6D975-A634-409F-87DE-521A45DF775F}.Release|x64.Build.0 = Release|Any CPU
{C1C6D975-A634-409F-87DE-521A45DF775F}.Release|x86.ActiveCfg = Release|Any CPU
{C1C6D975-A634-409F-87DE-521A45DF775F}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{6616448A-1AD7-4897-9124-F1560FB12461} = {39740782-6F07-470C-92B8-C0A07A5C0DFB}
{01C302FF-8E99-4D54-8234-D4BA59862176} = {39740782-6F07-470C-92B8-C0A07A5C0DFB}
{C1C6D975-A634-409F-87DE-521A45DF775F} = {39740782-6F07-470C-92B8-C0A07A5C0DFB}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E8A0EB3B-E5B8-4120-92DD-1C11CEE7017F}
Expand Down
Loading
Loading