Skip to content

Commit 76d2b3a

Browse files
initial release
0 parents  commit 76d2b3a

32 files changed

Lines changed: 1875 additions & 0 deletions

.editorconfig

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.cs]
12+
# CA2007: Consider calling ConfigureAwait on the awaited task
13+
# Not applicable in ASP.NET / plugin code where we want the synchronization context.
14+
dotnet_diagnostic.CA2007.severity = none
15+
16+
# CA1031: Do not catch general exception types
17+
# Plugin shutdown / background loops must swallow to finish cleanly.
18+
dotnet_diagnostic.CA1031.severity = none
19+
20+
# CA1848: Use the LoggerMessage delegates
21+
# Source-generated LoggerMessage is overkill for this plugin's log volume.
22+
dotnet_diagnostic.CA1848.severity = none
23+
24+
# CA1062: Validate arguments of public methods - handled by nullable reference types
25+
dotnet_diagnostic.CA1062.severity = none
26+
27+
[tests/**/*.cs]
28+
# CA1707: test methods use underscores by convention.
29+
dotnet_diagnostic.CA1707.severity = none

.github/pull_request_template.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!--
2+
Thanks for sending a PR to this Bowire plugin! Notes for review:
3+
- Keep one logical change per PR.
4+
- Please make sure `dotnet build -c Release` and `dotnet test` are
5+
green locally before pushing.
6+
- Conventional Commits — feat / fix / docs / refactor / test / chore.
7+
-->
8+
9+
## Summary
10+
11+
<!-- 1-3 sentences: what changes and why. -->
12+
13+
## Test plan
14+
15+
- [ ] Unit tests added or updated
16+
- [ ] `dotnet build -c Release` clean
17+
- [ ] `dotnet test` green
18+
- [ ] Smoke-tested via `bowire plugin install` against a local Bowire build (where applicable)
19+
20+
## Notes for the reviewer
21+
22+
<!-- Trade-offs, follow-ups, links to issues / Bowire core PRs. -->

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ['v*']
7+
pull_request:
8+
branches: [main]
9+
10+
env:
11+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
12+
DOTNET_CLI_TELEMETRY_OPTOUT: true
13+
DOTNET_NOLOGO: true
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v6
24+
with:
25+
fetch-depth: 0
26+
27+
- uses: actions/setup-dotnet@v5
28+
with:
29+
dotnet-version: '10.0.x'
30+
31+
- name: Restore
32+
run: dotnet restore Bowire.Protocol.Akka.slnx
33+
34+
- name: Build
35+
run: dotnet build Bowire.Protocol.Akka.slnx -c Release --no-restore
36+
37+
- name: Test
38+
run: dotnet test Bowire.Protocol.Akka.slnx -c Release --no-build -v normal

.github/workflows/release.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: ['v*']
6+
7+
env:
8+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
9+
DOTNET_CLI_TELEMETRY_OPTOUT: true
10+
DOTNET_NOLOGO: true
11+
12+
permissions:
13+
contents: write
14+
packages: write
15+
16+
jobs:
17+
release:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v6
22+
with:
23+
fetch-depth: 0
24+
25+
- uses: actions/setup-dotnet@v5
26+
with:
27+
dotnet-version: '10.0.x'
28+
29+
- name: Extract version
30+
id: version
31+
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
32+
33+
- name: Restore
34+
run: dotnet restore Bowire.Protocol.Akka.slnx
35+
36+
- name: Build & Test
37+
run: |
38+
dotnet build Bowire.Protocol.Akka.slnx -c Release --no-restore -p:Version=${{ steps.version.outputs.VERSION }}
39+
dotnet test Bowire.Protocol.Akka.slnx -c Release --no-build -v normal
40+
41+
- name: Pack
42+
run: dotnet pack Bowire.Protocol.Akka.slnx -c Release --no-build -o artifacts/packages -p:Version=${{ steps.version.outputs.VERSION }}
43+
44+
# Gated on non-RC tags so `v*-rc*` exercises the full pipeline as
45+
# a dry run without permanently publishing a package version.
46+
# GA tags (no `-rc` suffix) push for real.
47+
- name: Publish to GitHub Packages
48+
if: ${{ !contains(github.ref, '-rc') }}
49+
run: dotnet nuget push "artifacts/packages/*.nupkg" --source "https://nuget.pkg.github.com/Kuestenlogik/index.json" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
50+
51+
# nuget.org: only on real GA tags (no -rc), and only when the
52+
# secret is configured. NUGET_API_KEY needs the
53+
# 'Push new packages and package versions' scope with glob 'KL.*'.
54+
- name: Publish to nuget.org
55+
if: ${{ !contains(github.ref, '-rc') && env.NUGET_API_KEY != '' }}
56+
env:
57+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
58+
run: |
59+
dotnet nuget push "artifacts/packages/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key "$NUGET_API_KEY" --skip-duplicate
60+
dotnet nuget push "artifacts/packages/*.snupkg" --source https://api.nuget.org/v3/index.json --api-key "$NUGET_API_KEY" --skip-duplicate
61+
62+
- name: Create GitHub Release
63+
uses: softprops/action-gh-release@v2
64+
with:
65+
generate_release_notes: true
66+
prerelease: ${{ contains(github.ref, '-rc') }}
67+
files: artifacts/packages/*.nupkg

0 commit comments

Comments
 (0)