Skip to content

Commit cd16717

Browse files
authored
Merge a3af97e into f991078
2 parents f991078 + a3af97e commit cd16717

File tree

19 files changed

+644
-75
lines changed

19 files changed

+644
-75
lines changed

.github/workflows/build.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: .NET Core Desktop
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: windows-latest
12+
env:
13+
ROOT: ./src
14+
NUGET_AUTH_TOKEN: ${{secrets.token}}
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: 📂 Setup .NET Core
19+
uses: actions/setup-dotnet@v1
20+
with:
21+
dotnet-version: 5.0.100
22+
source-url: https://nuget.pkg.github.com/${{github.repository_owner}}/index.json
23+
env:
24+
NUGET_AUTH_TOKEN: ${{secrets.NUGET_READ_TOKEN}}
25+
26+
- name: 📂 Files
27+
working-directory: ${{env.ROOT}}
28+
run: ls -R
29+
30+
- name: 🚀 Building CodeBase.Client
31+
working-directory: ${{env.ROOT}}/CodeBase.Client
32+
run: dotnet publish -c RELEASE -o out
33+
34+
- uses: actions/upload-artifact@v2
35+
with:
36+
name: builds
37+
path: ${{env.ROOT}}/**/out
38+
retention-days: 1
39+
40+
deploy:
41+
42+
runs-on: ubuntu-latest
43+
needs: build
44+
#if: github.ref == 'refs/heads/master'
45+
env:
46+
ROOT: ./src
47+
NUGET_AUTH_TOKEN: ${{secrets.token}}
48+
49+
steps:
50+
- uses: actions/checkout@v2
51+
52+
- uses: actions/download-artifact@v2
53+
with:
54+
name: builds
55+
path: ${{env.ROOT}}
56+
57+
- name: 📂 Setup .NET Core
58+
uses: actions/setup-dotnet@v1
59+
with:
60+
dotnet-version: 5.0.100
61+
source-url: https://nuget.pkg.github.com/${{github.repository_owner}}/index.json
62+
env:
63+
NUGET_AUTH_TOKEN: ${{secrets.NUGET_READ_TOKEN}}
64+
65+
- name: 📂 Pack CodeBase.Client
66+
working-directory: ${{env.ROOT}}/CodeBase.Client/out
67+
run: |
68+
sudo apt-get update
69+
sudo apt-get install zip
70+
zip -r -9 ./CodeBase.Client.zip ./*
71+
72+
- name: 📂 Files
73+
working-directory: ${{env.ROOT}}
74+
run: ls -R
75+
76+
- name: Get current date
77+
id: date
78+
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
79+
80+
- name: Create Draft Release
81+
id: create_release
82+
uses: actions/create-release@v1
83+
env:
84+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
with:
86+
tag_name: ${{ steps.date.outputs.date }}
87+
release_name: Shapshot ${{ steps.date.outputs.date }}
88+
draft: true
89+
prerelease: false
90+
91+
- uses: actions/upload-release-asset@v1.0.1
92+
env:
93+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
with:
95+
upload_url: ${{ steps.create_release.outputs.upload_url }}
96+
asset_path: ./src/CodeBase.Client/out/CodeBase.Client.zip
97+
asset_name: CodeBase.Client.zip
98+
asset_content_type: application/zip
99+
100+
- uses: eregon/publish-release@v1
101+
env:
102+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103+
with:
104+
release_id: ${{ steps.create_release.outputs.id }}
105+

build.yml

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

src/.editorconfig

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
# LAST REVISION: 08-12-2020
2+
3+
root = true
4+
5+
# Don't use tabs for indentation.
6+
[*]
7+
indent_style = space
8+
# (Please don't specify an indent_size here; that has too many unintended consequences.)
9+
10+
# Code files
11+
[*.{cs,csx}]
12+
indent_size = 4
13+
insert_final_newline = true
14+
charset = utf-8-bom
15+
16+
# XML project files
17+
[*.{csproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
18+
indent_size = 2
19+
20+
# XML config files
21+
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
22+
indent_size = 2
23+
24+
# JSON files
25+
[*.json]
26+
indent_size = 2
27+
28+
# Powershell files
29+
[*.ps1]
30+
indent_size = 2
31+
32+
[*.cs]
33+
# Sort using and Import directives with System.* appearing first
34+
dotnet_sort_system_directives_first = true
35+
36+
# Avoid "this." if not necessary
37+
dotnet_style_qualification_for_field = false:refactoring
38+
dotnet_style_qualification_for_property = false:refactoring
39+
dotnet_style_qualification_for_method = false:refactoring
40+
dotnet_style_qualification_for_event = false:refactoring
41+
42+
# Use language keywords instead of framework type names for type references
43+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
44+
dotnet_style_predefined_type_for_member_access = true:suggestion
45+
46+
# Suggest more modern language features when available
47+
dotnet_style_object_initializer = true:suggestion
48+
dotnet_style_collection_initializer = true:suggestion
49+
dotnet_style_coalesce_expression = true:suggestion
50+
dotnet_style_null_propagation = true:suggestion
51+
dotnet_style_explicit_tuple_names = true:suggestion
52+
53+
##########################################
54+
# Styles
55+
##########################################
56+
57+
# prefix_interface_with_i_style - Interfaces must be PascalCase and the first character of an interface must be an 'I'
58+
dotnet_naming_style.prefix_interface_with_i_style.capitalization = pascal_case
59+
dotnet_naming_style.prefix_interface_with_i_style.required_prefix = I
60+
61+
# prefix_type_parameters_with_t_style - Generic Type Parameters must be PascalCase and the first character must be a 'T'
62+
dotnet_naming_style.prefix_type_parameters_with_t_style.capitalization = pascal_case
63+
dotnet_naming_style.prefix_type_parameters_with_t_style.required_prefix = T
64+
65+
###########################################
66+
67+
# Non-private static fields are PascalCase
68+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = error
69+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields
70+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style
71+
dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field
72+
dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected
73+
dotnet_naming_symbols.non_private_static_fields.required_modifiers = static
74+
dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case
75+
76+
# Non-private readonly fields are PascalCase
77+
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.severity = error
78+
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.symbols = non_private_readonly_fields
79+
dotnet_naming_rule.non_private_readonly_fields_should_be_pascal_case.style = non_private_readonly_field_style
80+
dotnet_naming_symbols.non_private_readonly_fields.applicable_kinds = field
81+
dotnet_naming_symbols.non_private_readonly_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected
82+
dotnet_naming_symbols.non_private_readonly_fields.required_modifiers = readonly
83+
dotnet_naming_style.non_private_readonly_field_style.capitalization = pascal_case
84+
85+
# Constants are PascalCase
86+
dotnet_naming_rule.constants_should_be_pascal_case.severity = error
87+
dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
88+
dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style
89+
dotnet_naming_symbols.constants.applicable_kinds = field, local
90+
dotnet_naming_symbols.constants.required_modifiers = const
91+
dotnet_naming_style.constant_style.capitalization = pascal_case
92+
93+
# Instance fields are camelCase and start with _
94+
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = error
95+
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
96+
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
97+
dotnet_naming_symbols.instance_fields.applicable_kinds = field
98+
dotnet_naming_style.instance_field_style.capitalization = camel_case
99+
dotnet_naming_style.instance_field_style.required_prefix = _
100+
101+
# Locals and parameters are camelCase
102+
dotnet_naming_rule.locals_should_be_camel_case.severity = error
103+
dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters
104+
dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style
105+
dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local
106+
dotnet_naming_style.camel_case_style.capitalization = camel_case
107+
108+
# Local functions are PascalCase
109+
dotnet_naming_rule.local_functions_should_be_pascal_case.severity = error
110+
dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions
111+
dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style
112+
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
113+
dotnet_naming_style.local_function_style.capitalization = pascal_case
114+
115+
# Interfaces use PascalCase and are prefixed with uppercase 'I'
116+
# https://docs.microsoft.com/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces
117+
dotnet_naming_symbols.interface_group.applicable_kinds = interface
118+
dotnet_naming_rule.interface_rule.symbols = interface_group
119+
dotnet_naming_rule.interface_rule.style = prefix_interface_with_i_style
120+
dotnet_naming_rule.interface_rule.severity = error
121+
122+
# Generics Type Parameters use PascalCase and are prefixed with uppercase 'T'
123+
# https://docs.microsoft.com/dotnet/standard/design-guidelines/names-of-classes-structs-and-interfaces
124+
dotnet_naming_symbols.type_parameter_group.applicable_kinds = type_parameter
125+
dotnet_naming_rule.type_parameter_rule.symbols = type_parameter_group
126+
dotnet_naming_rule.type_parameter_rule.style = prefix_type_parameters_with_t_style
127+
dotnet_naming_rule.type_parameter_rule.severity = error
128+
129+
# By default, name items with PascalCase
130+
dotnet_naming_rule.members_should_be_pascal_case.severity = error
131+
dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members
132+
dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style
133+
dotnet_naming_symbols.all_members.applicable_kinds = *
134+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
135+
136+
# Newline settings
137+
csharp_new_line_before_open_brace = all
138+
csharp_new_line_before_else = true
139+
csharp_new_line_before_catch = true
140+
csharp_new_line_before_finally = true
141+
csharp_new_line_before_members_in_object_initializers = true
142+
csharp_new_line_before_members_in_anonymous_types = true
143+
csharp_new_line_between_query_expression_clauses = true
144+
145+
# Indentation preferences
146+
csharp_indent_block_contents = true
147+
csharp_indent_braces = false
148+
csharp_indent_case_contents = true
149+
csharp_indent_case_contents_when_block = true
150+
csharp_indent_switch_labels = true
151+
csharp_indent_labels = flush_left
152+
153+
# Prefer "var" everywhere
154+
csharp_style_var_for_built_in_types = true:suggestion
155+
csharp_style_var_when_type_is_apparent = true:suggestion
156+
csharp_style_var_elsewhere = true:suggestion
157+
158+
# Prefer method-like constructs to have a block body
159+
csharp_style_expression_bodied_methods = false:none
160+
csharp_style_expression_bodied_constructors = false:none
161+
csharp_style_expression_bodied_operators = false:none
162+
163+
# Prefer property-like constructs to have an expression-body
164+
csharp_style_expression_bodied_properties = true:none
165+
csharp_style_expression_bodied_indexers = true:none
166+
csharp_style_expression_bodied_accessors = true:none
167+
168+
# Suggest more modern language features when available
169+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
170+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
171+
csharp_style_inlined_variable_declaration = true:suggestion
172+
csharp_style_throw_expression = true:suggestion
173+
csharp_style_conditional_delegate_call = true:suggestion
174+
175+
# Space preferences
176+
csharp_space_after_cast = false
177+
csharp_space_after_colon_in_inheritance_clause = true
178+
csharp_space_after_comma = true
179+
csharp_space_after_dot = false
180+
csharp_space_after_keywords_in_control_flow_statements = true
181+
csharp_space_after_semicolon_in_for_statement = true
182+
csharp_space_around_binary_operators = before_and_after
183+
csharp_space_around_declaration_statements = do_not_ignore
184+
csharp_space_before_colon_in_inheritance_clause = true
185+
csharp_space_before_comma = false
186+
csharp_space_before_dot = false
187+
csharp_space_before_open_square_brackets = false
188+
csharp_space_before_semicolon_in_for_statement = false
189+
csharp_space_between_empty_square_brackets = false
190+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
191+
csharp_space_between_method_call_name_and_opening_parenthesis = false
192+
csharp_space_between_method_call_parameter_list_parentheses = false
193+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
194+
csharp_space_between_method_declaration_name_and_open_parenthesis = false
195+
csharp_space_between_method_declaration_parameter_list_parentheses = false
196+
csharp_space_between_parentheses = false
197+
csharp_space_between_square_brackets = false
198+
199+
# Blocks are allowed
200+
csharp_prefer_braces = true:silent
201+
csharp_preserve_single_line_blocks = true
202+
csharp_preserve_single_line_statements = true

0 commit comments

Comments
 (0)