Skip to content

Commit 04978d4

Browse files
committed
Initial commit
0 parents  commit 04978d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1648
-0
lines changed

.editorconfig

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
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+
# Sort using and Import directives with System.* appearing first
34+
dotnet_sort_system_directives_first = true
35+
# Avoid "this." and "Me." if not necessary
36+
dotnet_style_qualification_for_field = false:suggestion
37+
dotnet_style_qualification_for_property = false:suggestion
38+
dotnet_style_qualification_for_method = false:suggestion
39+
dotnet_style_qualification_for_event = false:suggestion
40+
41+
# Use language keywords instead of framework type names for type references
42+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
43+
dotnet_style_predefined_type_for_member_access = true:suggestion
44+
45+
# Suggest more modern language features when available
46+
dotnet_style_object_initializer = true:suggestion
47+
dotnet_style_collection_initializer = true:suggestion
48+
dotnet_style_coalesce_expression = true:suggestion
49+
dotnet_style_null_propagation = true:suggestion
50+
dotnet_style_explicit_tuple_names = true:suggestion
51+
52+
# CSharp code style settings:
53+
54+
# IDE0040: Add accessibility modifiers
55+
dotnet_style_require_accessibility_modifiers = omit_if_default:error
56+
57+
# IDE0040: Add accessibility modifiers
58+
dotnet_diagnostic.IDE0040.severity = error
59+
60+
[*.cs]
61+
# Prefer "var" everywhere
62+
csharp_style_var_for_built_in_types = true:suggestion
63+
csharp_style_var_when_type_is_apparent = true:suggestion
64+
csharp_style_var_elsewhere = true:suggestion
65+
66+
# Prefer method-like constructs to have an expression-body
67+
csharp_style_expression_bodied_methods = true:none
68+
csharp_style_expression_bodied_constructors = true:none
69+
csharp_style_expression_bodied_operators = true:none
70+
71+
# Prefer property-like constructs to have an expression-body
72+
csharp_style_expression_bodied_properties = true:none
73+
csharp_style_expression_bodied_indexers = true:none
74+
csharp_style_expression_bodied_accessors = true:none
75+
76+
# Suggest more modern language features when available
77+
csharp_style_pattern_matching_over_is_with_cast_check = true:error
78+
csharp_style_pattern_matching_over_as_with_null_check = true:error
79+
csharp_style_inlined_variable_declaration = true:suggestion
80+
csharp_style_throw_expression = true:suggestion
81+
csharp_style_conditional_delegate_call = true:suggestion
82+
83+
# Newline settings
84+
csharp_new_line_before_open_brace = all
85+
csharp_new_line_before_else = true
86+
csharp_new_line_before_catch = true
87+
csharp_new_line_before_finally = true
88+
csharp_new_line_before_members_in_object_initializers = true
89+
csharp_new_line_before_members_in_anonymous_types = true

.gitattributes

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# sln, csproj files (and friends) are always CRLF, even on linux
2+
*.sln text eol=crlf
3+
*.proj text eol=crlf
4+
*.csproj text eol=crlf
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
10+
11+
# Opt in known filetypes to always normalize line endings on checkin
12+
# and always use native endings on checkout
13+
*.c text
14+
*.config text
15+
*.h text
16+
*.cs text
17+
*.md text
18+
*.tt text
19+
*.txt text
20+
21+
# Some must always be checked out as lf so enforce that for those files
22+
# If these are not lf then bash/cygwin on windows will not be able to
23+
# excute the files
24+
*.sh text eol=lf

.github/.github_changelog_generator

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,question,invalid,wontfix,need info
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/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: devlooped

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us fix a problem.
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
---
8+
9+
## Describe the Bug
10+
11+
<!-- A clear and concise description of what the bug is. -->
12+
13+
## Steps to Reproduce
14+
15+
<!-- Tell us how to reproduce the issue. Ideally provide a failing unit test. -->
16+
17+
```c#
18+
public class ReproTest
19+
{
20+
[Fact]
21+
public void Repro()
22+
{
23+
// arrange
24+
25+
// act
26+
27+
// assert
28+
}
29+
}
30+
```
31+
32+
## Expected Behavior
33+
34+
<!-- Describe what you expected to happen. -->
35+
36+
## Exception with Stack Trace
37+
38+
<!-- If you see an exception, put the WHOLE THING here. -->
39+
40+
```text
41+
Put the exception with stack trace here.
42+
```
43+
44+
## Version Info
45+
46+
<!-- Main project version and other relevant dependencies you are using. -->
47+
48+
## Additional Info
49+
50+
<!-- Add any other context about the problem here. -->

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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: weekly

.github/workflows/build.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
push:
8+
branches: [ main, dev, 'feature/*', 'rel/*' ]
9+
paths-ignore:
10+
- changelog.md
11+
- code-of-conduct.md
12+
- security.md
13+
- support.md
14+
- readme.md
15+
pull_request:
16+
types: [opened, synchronize, reopened]
17+
18+
env:
19+
DOTNET_NOLOGO: true
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: 🤘 checkout
26+
uses: actions/checkout@v2
27+
28+
- name: ⚙ dotnet
29+
uses: actions/setup-dotnet@v1
30+
with:
31+
dotnet-version: '6.0.x'
32+
33+
- name: ⏬ download
34+
run: |
35+
mkdir obj
36+
curl https://download-chromium.appspot.com/dl/Win_x64?type=snapshots -L -o obj/chrome-win.zip
37+
unzip obj/chrome-win.zip -d src/chromium-win-x64
38+
curl https://download-chromium.appspot.com/dl/Linux_x64?type=snapshots -L -o obj/chrome-linux.zip
39+
unzip obj/chrome-linux.zip -d src/chromium-linux-x64
40+
41+
- name: 🙏 build
42+
run: dotnet build -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
43+
44+
- name: 📦 pack
45+
run: dotnet pack -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
46+
47+
- name: 🚀 sleet
48+
env:
49+
SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }}
50+
if: env.SLEET_CONNECTION != ''
51+
run: |
52+
dotnet tool install -g --version 4.0.18 sleet
53+
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"

.github/workflows/changelog.yml

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

.github/workflows/dotnet-file.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Synchronizes .netconfig-configured files with dotnet-file
2+
name: dotnet-file
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * *"
7+
push:
8+
branches: [ 'dotnet-file' ]
9+
10+
env:
11+
DOTNET_NOLOGO: true
12+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
13+
14+
jobs:
15+
sync:
16+
runs-on: windows-latest
17+
steps:
18+
- name: 🔍 GH_TOKEN
19+
if: env.GH_TOKEN == ''
20+
shell: bash
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV
24+
25+
- name: 🤘 checkout
26+
uses: actions/checkout@v2
27+
with:
28+
fetch-depth: 0
29+
ref: main
30+
token: ${{ env.GH_TOKEN }}
31+
32+
- name: 🔄 sync
33+
run: |
34+
dotnet tool update -g dotnet-gcm
35+
dotnet gcm store --protocol=https --host=github.com --username=$env:GITHUB_ACTOR --password=$env:GH_TOKEN
36+
gh auth status
37+
38+
dotnet tool update -g dotnet-file
39+
dotnet file sync -c:$env:TEMP\dotnet-file.md
40+
if (test-path $env:TEMP\dotnet-file.md) {
41+
echo 'CHANGES<<EOF' >> $env:GITHUB_ENV
42+
cat $env:TEMP\dotnet-file.md >> $env:GITHUB_ENV
43+
echo 'EOF' >> $env:GITHUB_ENV
44+
cat $env:TEMP\dotnet-file.md
45+
} else {
46+
echo 'No changelog was generated'
47+
}
48+
49+
- name: ✍ pull request
50+
uses: peter-evans/create-pull-request@v3
51+
with:
52+
base: main
53+
branch: dotnet-file-sync
54+
delete-branch: true
55+
labels: dependencies
56+
commit-message: ⬆️ Bump files with dotnet-file sync
57+
58+
${{ env.CHANGES }}
59+
title: "Bump files with dotnet-file sync"
60+
body: ${{ env.CHANGES }}
61+
token: ${{ env.GH_TOKEN }}

0 commit comments

Comments
 (0)