Skip to content

Commit 2d9b3b8

Browse files
committed
Scaffold oss template and add empty project
0 parents  commit 2d9b3b8

23 files changed

+1358
-0
lines changed

.editorconfig

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# EditorConfig is awesome:http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Don't use tabs for indentation.
7+
[*]
8+
indent_style = space
9+
# (Please don't specify an indent_size here; that has too many unintended consequences.)
10+
11+
# Code files
12+
[*.{cs,csx,vb,vbx}]
13+
indent_size = 4
14+
15+
# Xml project files
16+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj,msbuildproj,props,targets}]
17+
indent_size = 2
18+
19+
# Xml config files
20+
[*.{ruleset,config,nuspec,resx,vsixmanifest,vsct}]
21+
indent_size = 2
22+
23+
# YAML files
24+
[*.{yaml,yml}]
25+
indent_size = 2
26+
27+
# JSON files
28+
[*.json]
29+
indent_size = 2
30+
31+
# Dotnet code style settings:
32+
[*.{cs,vb}]
33+
tab_width = 4
34+
35+
# Sort using and Import directives with System.* appearing first
36+
dotnet_sort_system_directives_first = true
37+
# Avoid "this." and "Me." if not necessary
38+
dotnet_style_qualification_for_field = false:suggestion
39+
dotnet_style_qualification_for_property = false:suggestion
40+
dotnet_style_qualification_for_method = false:suggestion
41+
dotnet_style_qualification_for_event = false:suggestion
42+
43+
# Use language keywords instead of framework type names for type references
44+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
45+
dotnet_style_predefined_type_for_member_access = true:suggestion
46+
47+
# Suggest more modern language features when available
48+
dotnet_style_object_initializer = true:suggestion
49+
dotnet_style_collection_initializer = true:suggestion
50+
dotnet_style_coalesce_expression = true:suggestion
51+
dotnet_style_null_propagation = true:suggestion
52+
dotnet_style_explicit_tuple_names = true:suggestion
53+
54+
# CSharp code style settings:
55+
56+
# IDE0040: Add accessibility modifiers
57+
dotnet_style_require_accessibility_modifiers = omit_if_default:error
58+
59+
# IDE0040: Add accessibility modifiers
60+
dotnet_diagnostic.IDE0040.severity = error
61+
62+
# IDE1100: Error reading content of source file 'Project.TargetFrameworkMoniker' (i.e. from ThisAssembly)
63+
dotnet_diagnostic.IDE1100.severity = none
64+
65+
[*.cs]
66+
# Top-level files are definitely OK
67+
csharp_using_directive_placement = outside_namespace:silent
68+
csharp_style_namespace_declarations = block_scoped:silent
69+
csharp_prefer_simple_using_statement = true:suggestion
70+
csharp_prefer_braces = true:silent
71+
72+
# Prefer "var" everywhere
73+
csharp_style_var_for_built_in_types = true:suggestion
74+
csharp_style_var_when_type_is_apparent = true:suggestion
75+
csharp_style_var_elsewhere = true:suggestion
76+
77+
# Prefer method-like constructs to have an expression-body
78+
csharp_style_expression_bodied_methods = true:none
79+
csharp_style_expression_bodied_constructors = true:none
80+
csharp_style_expression_bodied_operators = true:none
81+
82+
# Prefer property-like constructs to have an expression-body
83+
csharp_style_expression_bodied_properties = true:none
84+
csharp_style_expression_bodied_indexers = true:none
85+
csharp_style_expression_bodied_accessors = true:none
86+
87+
# Suggest more modern language features when available
88+
csharp_style_pattern_matching_over_is_with_cast_check = true:error
89+
csharp_style_pattern_matching_over_as_with_null_check = true:error
90+
csharp_style_inlined_variable_declaration = true:suggestion
91+
csharp_style_throw_expression = true:suggestion
92+
csharp_style_conditional_delegate_call = true:suggestion
93+
94+
# Newline settings
95+
csharp_new_line_before_open_brace = all
96+
csharp_new_line_before_else = true
97+
csharp_new_line_before_catch = true
98+
csharp_new_line_before_finally = true
99+
csharp_new_line_before_members_in_object_initializers = true
100+
csharp_new_line_before_members_in_anonymous_types = true
101+
102+
# Test settings
103+
[**/*Tests*/**{.cs,.vb}]
104+
# xUnit1013: Public method should be marked as test. Allows using records as test classes
105+
dotnet_diagnostic.xUnit1013.severity = none
106+
107+
# CS9113: Parameter is unread (usually, ITestOutputHelper)
108+
dotnet_diagnostic.CS9113.severity = none
109+
110+
# Default severity for analyzer diagnostics with category 'Style'
111+
dotnet_analyzer_diagnostic.category-Style.severity = none
112+
113+
# VSTHRD200: Use "Async" suffix for async methods
114+
dotnet_diagnostic.VSTHRD200.severity = none

.gitattributes

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# normalize by default
2+
* text=auto encoding=UTF-8
3+
*.sh text eol=lf
4+
*.sbn eol=lf
5+
6+
# These are windows specific files which we may as well ensure are
7+
# always crlf on checkout
8+
*.bat text eol=crlf
9+
*.cmd text eol=crlf

.github/dependabot.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Please see the documentation for all configuration options:
2+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
4+
version: 2
5+
updates:
6+
- package-ecosystem: nuget
7+
directory: /
8+
schedule:
9+
interval: daily
10+
groups:
11+
Azure:
12+
patterns:
13+
- "Azure*"
14+
- "Microsoft.Azure*"
15+
Identity:
16+
patterns:
17+
- "System.IdentityModel*"
18+
- "Microsoft.IdentityModel*"
19+
System:
20+
patterns:
21+
- "System*"
22+
exclude-patterns:
23+
- "System.IdentityModel*"
24+
Extensions:
25+
patterns:
26+
- "Microsoft.Extensions*"
27+
exclude-patterns:
28+
- "Microsoft.Extensions.AI*"
29+
ExtensionsAI:
30+
patterns:
31+
- "Microsoft.Extensions.AI*"
32+
Web:
33+
patterns:
34+
- "Microsoft.AspNetCore*"
35+
Tests:
36+
patterns:
37+
- "Microsoft.NET.Test*"
38+
- "xunit*"
39+
- "coverlet*"
40+
ThisAssembly:
41+
patterns:
42+
- "ThisAssembly*"
43+
ProtoBuf:
44+
patterns:
45+
- "protobuf-*"
46+
Spectre:
47+
patterns:
48+
- "Spectre.Console*"

.github/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- bydesign
5+
- dependencies
6+
- duplicate
7+
- question
8+
- invalid
9+
- wontfix
10+
- need info
11+
- techdebt
12+
authors:
13+
- devlooped-bot
14+
- dependabot
15+
- github-actions
16+
categories:
17+
- title: ✨ Implemented enhancements
18+
labels:
19+
- enhancement
20+
- title: 🐛 Fixed bugs
21+
labels:
22+
- bug
23+
- title: 📝 Documentation updates
24+
labels:
25+
- docs
26+
- documentation
27+
- title: 🔨 Other
28+
labels:
29+
- '*'
30+
exclude:
31+
labels:
32+
- dependencies

.github/workflows/build.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Builds and runs tests in all three supported OSes
2+
# Pushes CI feed if secrets.SLEET_CONNECTION is provided
3+
4+
name: build
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
configuration:
9+
type: choice
10+
description: Configuration
11+
options:
12+
- Release
13+
- Debug
14+
push:
15+
branches: [ main, dev, 'dev/*', 'feature/*', 'rel/*' ]
16+
paths-ignore:
17+
- changelog.md
18+
- readme.md
19+
pull_request:
20+
types: [opened, synchronize, reopened]
21+
22+
env:
23+
DOTNET_NOLOGO: true
24+
PackOnBuild: true
25+
GeneratePackageOnBuild: true
26+
VersionPrefix: 42.42.${{ github.run_number }}
27+
VersionLabel: ${{ github.ref }}
28+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
29+
MSBUILDTERMINALLOGGER: auto
30+
Configuration: ${{ github.event.inputs.configuration || 'Release' }}
31+
SLEET_FEED_URL: ${{ vars.SLEET_FEED_URL }}
32+
33+
defaults:
34+
run:
35+
shell: bash
36+
37+
jobs:
38+
os-matrix:
39+
runs-on: ubuntu-latest
40+
outputs:
41+
matrix: ${{ steps.lookup.outputs.matrix }}
42+
steps:
43+
- name: 🤘 checkout
44+
uses: actions/checkout@v4
45+
46+
- name: 🔎 lookup
47+
id: lookup
48+
shell: pwsh
49+
run: |
50+
$path = './.github/workflows/os-matrix.json'
51+
$os = if (test-path $path) { cat $path } else { '["ubuntu-latest"]' }
52+
echo "matrix=$os" >> $env:GITHUB_OUTPUT
53+
54+
build:
55+
needs: os-matrix
56+
name: build-${{ matrix.os }}
57+
runs-on: ${{ matrix.os }}
58+
strategy:
59+
matrix:
60+
os: ${{ fromJSON(needs.os-matrix.outputs.matrix) }}
61+
steps:
62+
- name: 🤘 checkout
63+
uses: actions/checkout@v4
64+
with:
65+
submodules: recursive
66+
fetch-depth: 0
67+
68+
- name: ⚙ dotnet
69+
uses: devlooped/actions-dotnet-env@v1
70+
71+
- name: 🙏 build
72+
run: dotnet build -m:1 -bl:build.binlog
73+
74+
- name: 🧪 test
75+
run: |
76+
dotnet tool update -g dotnet-retest
77+
dotnet retest -- --no-build
78+
79+
- name: 🐛 logs
80+
uses: actions/upload-artifact@v4
81+
if: runner.debug && always()
82+
with:
83+
name: logs
84+
path: '*.binlog'
85+
86+
- name: 🚀 sleet
87+
env:
88+
SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }}
89+
if: env.SLEET_CONNECTION != ''
90+
run: |
91+
dotnet tool update sleet -g --allow-downgrade --version $(curl -s --compressed ${{ vars.SLEET_FEED_URL }} | jq '.["sleet:version"]' -r)
92+
sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" || echo "No packages found"
93+
94+
dotnet-format:
95+
runs-on: ubuntu-latest
96+
steps:
97+
- name: 🤘 checkout
98+
uses: actions/checkout@v4
99+
with:
100+
submodules: recursive
101+
fetch-depth: 0
102+
103+
- name: ⚙ dotnet
104+
uses: devlooped/actions-dotnet-env@v1
105+
106+
- name: ✓ ensure format
107+
run: |
108+
dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget
109+
dotnet format style --verify-no-changes -v:diag --exclude ~/.nuget

.github/workflows/changelog.config

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
usernames-as-github-logins=true
2+
issues_wo_labels=true
3+
pr_wo_labels=true
4+
exclude-labels=bydesign,dependencies,duplicate,discussion,question,invalid,wontfix,need info,docs
5+
enhancement-label=:sparkles: Implemented enhancements:
6+
bugs-label=:bug: Fixed bugs:
7+
issues-label=:hammer: Other:
8+
pr-label=:twisted_rightwards_arrows: Merged:
9+
unreleased=false

.github/workflows/changelog.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: changelog
2+
on:
3+
workflow_dispatch:
4+
release:
5+
types: [released]
6+
7+
jobs:
8+
changelog:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: 🤖 defaults
12+
uses: devlooped/actions-bot@v1
13+
with:
14+
name: ${{ secrets.BOT_NAME }}
15+
email: ${{ secrets.BOT_EMAIL }}
16+
gh_token: ${{ secrets.GH_TOKEN }}
17+
github_token: ${{ secrets.GITHUB_TOKEN }}
18+
19+
- name: 🤘 checkout
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
ref: main
24+
token: ${{ env.GH_TOKEN }}
25+
26+
- name: ⚙ ruby
27+
uses: ruby/setup-ruby@v1
28+
with:
29+
ruby-version: 3.0.3
30+
31+
- name: ⚙ changelog
32+
run: |
33+
gem install github_changelog_generator
34+
github_changelog_generator --user ${GITHUB_REPOSITORY%/*} --project ${GITHUB_REPOSITORY##*/} --token $GH_TOKEN --o changelog.md --config-file .github/workflows/changelog.config
35+
36+
- name: 🚀 changelog
37+
run: |
38+
git add changelog.md
39+
(git commit -m "🖉 Update changelog with ${GITHUB_REF#refs/*/}" && git push) || echo "Done"

0 commit comments

Comments
 (0)