Skip to content

Commit

Permalink
Merge pull request #97 from kohanis/merge-2.2.2
Browse files Browse the repository at this point in the history
Merging upstream
  • Loading branch information
ManlyMarco authored May 30, 2024
2 parents b0261a8 + 0794ba0 commit 7c44c07
Show file tree
Hide file tree
Showing 117 changed files with 4,843 additions and 3,318 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"cake.tool": {
"version": "2.0.0",
"version": "4.0.0",
"commands": [
"dotnet-cake"
]
Expand Down
78 changes: 75 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggesti
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion
csharp_style_expression_bodied_methods = false:suggestion
csharp_style_expression_bodied_constructors = false:suggestion
csharp_style_expression_bodied_operators = false:suggestion
csharp_style_expression_bodied_methods = when_on_single_line:suggestion
csharp_style_expression_bodied_constructors = when_on_single_line:suggestion
csharp_style_expression_bodied_operators = when_on_single_line:suggestion
csharp_style_expression_bodied_properties = true:suggestion
csharp_style_expression_bodied_indexers = true:suggestion
csharp_style_expression_bodied_accessors = true:suggestion
Expand Down Expand Up @@ -71,3 +71,75 @@ csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_preserve_single_line_statements = true
csharp_preserve_single_line_blocks = true
csharp_using_directive_placement = outside_namespace:silent
csharp_prefer_simple_using_statement = true:warning
csharp_style_namespace_declarations = block_scoped:silent
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_expression_bodied_lambdas = when_on_single_line:silent
csharp_style_expression_bodied_local_functions = when_on_single_line:silent
csharp_style_prefer_primary_constructors = true:suggestion

[*.{cs,vb}]
#### Naming styles ####

# Naming rules

dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i

dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case

dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case

# Symbol specifications

dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =

dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =

dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =

# Naming styles

dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 3
indent_size = 3
dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
53 changes: 37 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,53 @@
name: Build

on: [push, pull_request]
on:
push:
branches:
- "**"
pull_request:
workflow_dispatch:

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1

jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-dotnet@v1
- name: Checkout
uses: actions/checkout@v4

- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.1.x
6.0.300
dotnet-version: |
3.x
5.x
6.x
7.x
8.x
- name: Log dotnet info
run: dotnet --info

- name: Run test
run: ./build.ps1 --target=Test

build:
runs-on: windows-latest
if: github.ref == 'refs/heads/master'
needs: test

steps:
- uses: actions/checkout@v1

- uses: actions/setup-dotnet@v1
- name: Checkout
uses: actions/checkout@v4

- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.1.x
6.0.300
dotnet-version: '8.x'

- name: Make repo pushable
env:
Expand All @@ -49,9 +68,11 @@ jobs:
- name: Get target file
id: getfilename
shell: bash
run: echo "::set-output name=file::$(ls ./Harmony/bin/Release/HarmonyX*.nupkg)"

- uses: actions/upload-artifact@v1
run: |
echo "file=$(ls ./Harmony/bin/Release/HarmonyX*.nupkg)" >> "$GITHUB_OUTPUT"
- name: Upload HarmonyX nupkg
uses: actions/upload-artifact@v4
with:
path: ${{ steps.getfilename.outputs.file }}
name: HarmonyX
path: ${{ steps.getfilename.outputs.file }}
47 changes: 24 additions & 23 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,47 @@ on:
tags:
- 'v*'

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1

permissions:
contents: write

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
6.0.300
- name: Checkout
uses: actions/checkout@v4

- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'

- name: Get Version
id: get_version
shell: bash
run: |
tag=${GITHUB_REF##*/}
echo Current branch: ${tag:1}
echo ::set-output name=version_num::${tag:1}
echo "version_num=${tag:1}" >> "$GITHUB_OUTPUT"
- name: Run build script
run: ./build.ps1 --target=Build
shell: powershell

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
name: Release ${{ github.ref }}
body: ""
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./Harmony/bin/Release/HarmonyX.${{ steps.get_version.outputs.version_num }}.nupkg
asset_name: HarmonyX.${{ steps.get_version.outputs.version_num }}.nupkg
asset_content_type: application/zip
token: ${{ secrets.GITHUB_TOKEN }}
files: |
./Harmony/bin/Release/HarmonyX.${{ steps.get_version.outputs.version_num }}.nupkg
Loading

0 comments on commit 7c44c07

Please sign in to comment.