From 09853c7e1967480dfc0f3fee93dd334a262d9fc3 Mon Sep 17 00:00:00 2001 From: Serge K Date: Sun, 14 Jul 2024 14:16:27 +0700 Subject: [PATCH] ci: setup ghpr --- .editorconfig | 20 ++++---------------- .gitattributes | 6 ------ .github/workflows/build.yml | 7 ++++--- 3 files changed, 8 insertions(+), 25 deletions(-) diff --git a/.editorconfig b/.editorconfig index fdb2b96..7920251 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,23 +3,12 @@ root = true [*] charset = utf-8 end_of_line = lf +indent_size = 2 indent_style = space -max_line_length = 180 +max_line_length = 160 insert_final_newline = true trim_trailing_whitespace = true -[{*.csproj, *.props, .ruleset}] -indent_size = 2 - -[{*.yml, *.yaml}] -indent_size = 2 - -[*.json] -indent_size = 2 - -[{*.sh, *.ps1}] -indent_size = 2 - [*.cs] indent_size = 4 @@ -72,12 +61,11 @@ csharp_style_conditional_delegate_call = true:suggestion csharp_new_line_before_else = true csharp_new_line_before_catch = true csharp_new_line_before_finally = true -csharp_new_line_before_members_in_object_initializers = true -csharp_new_line_before_members_in_anonymous_types = true ## Naming -# private fields should be _camelCase +### private fields should be _camelCase + dotnet_naming_style.underscore_prefix.capitalization = camel_case dotnet_naming_style.underscore_prefix.required_prefix = _ diff --git a/.gitattributes b/.gitattributes index be48d62..176a458 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1 @@ -# Auto detect text files and perform LF normalization * text=auto - -# Custom for Visual Studio -*.cs diff=csharp -*.sln merge=union -*.csproj merge=union diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7dd077a..dfa67ee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,11 +12,12 @@ on: jobs: build: name: Build - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup .NET - uses: actions/setup-dotnet@v4 + - name: Setup GHPR + run: dotnet nuget add source -u ${{ github.repository_owner }} -p ${{ secrets.GH_FULL_PAT }} + --store-password-in-clear-text -n github "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" - name: Build run: dotnet build -c Release