From e2811ede850f3752e4a2040dc6f376d4e4436763 Mon Sep 17 00:00:00 2001 From: Mirko Da Corte Date: Tue, 5 Mar 2024 16:01:54 +0100 Subject: [PATCH] add additional solution files --- .editorconfig | 38 +++++++ .github/workflows/publish-stable.yml | 150 +++++++++++++++++++++++++++ EthernaGatewayCli.sln | 3 + README.md | 14 ++- nuget.config | 9 ++ 5 files changed, 212 insertions(+), 2 deletions(-) create mode 100644 .editorconfig create mode 100644 .github/workflows/publish-stable.yml create mode 100644 nuget.config diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..3a8ac05 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,38 @@ +# Remove the line below if you want to inherit .editorconfig settings from higher directories +root = true + +#### Define style #### + +# All files +[*] +indent_style = space + +# C# Project, JS and CSS files +[*.{csproj,js,ts,css,scss}] +indent_size = 2 + +#### Suppress warnings #### + +# C# files +[*.cs] + +# CA1303: Do not pass literals as localized parameters +dotnet_diagnostic.CA1303.severity = none # Don't need translated exceptions + +# CA1308: Normalize strings to uppercase +dotnet_diagnostic.CA1308.severity = none # Also to lower is required + +# CA1707: Identifiers should not contain underscores +dotnet_diagnostic.CA1707.severity = none # I like underscores into constants name + +# CA1812: Avoid uninstantiated internal classes +dotnet_diagnostic.CA1812.severity = none # Doing extensive use of Dependency Injection + +# CA1822: Mark members as static +dotnet_diagnostic.CA1822.severity = none # Don't like static members + +# CA2007: Consider calling ConfigureAwait on the awaited task +dotnet_diagnostic.CA2007.severity = none # .Net core doesn't require it + +# CA2234: Pass system uri objects instead of strings +dotnet_diagnostic.CA2234.severity = none diff --git a/.github/workflows/publish-stable.yml b/.github/workflows/publish-stable.yml new file mode 100644 index 0000000..0e512e6 --- /dev/null +++ b/.github/workflows/publish-stable.yml @@ -0,0 +1,150 @@ +name: Publish stable release + +on: + push: + tags: + - 'v*.*.*' + +jobs: + release: + name: Release + + strategy: + matrix: + kind: [ + 'linux-x64', + 'linux-arm', + 'linux-arm64', + + 'linux-selfcont-x64', + 'linux-selfcont-arm', + 'linux-selfcont-arm64', + + 'macos-x64', + 'macos-arm64', + + 'macos-selfcont-x64', + 'macos-selfcont-arm64', + + 'windows-x86', + 'windows-x64', + 'windows-arm', + 'windows-arm64', + + 'windows-selfcont-x86', + 'windows-selfcont-x64', + 'windows-selfcont-arm', + 'windows-selfcont-arm64'] + include: + - kind: linux-x64 + os: ubuntu-latest + target: linux-x64 + frameworktype: --no-self-contained + - kind: linux-arm + os: ubuntu-latest + target: linux-arm + frameworktype: --no-self-contained + - kind: linux-arm64 + os: ubuntu-latest + target: linux-arm64 + frameworktype: --no-self-contained + + - kind: linux-selfcont-x64 + os: ubuntu-latest + target: linux-x64 + frameworktype: --self-contained + - kind: linux-selfcont-arm + os: ubuntu-latest + target: linux-arm + frameworktype: --self-contained + - kind: linux-selfcont-arm64 + os: ubuntu-latest + target: linux-arm64 + frameworktype: --self-contained + + - kind: macos-x64 + os: macOS-latest + target: osx-x64 + frameworktype: --no-self-contained + - kind: macos-arm64 + os: macOS-latest + target: osx-arm64 + frameworktype: --no-self-contained + + - kind: macos-selfcont-x64 + os: macOS-latest + target: osx-x64 + frameworktype: --self-contained + - kind: macos-selfcont-arm64 + os: macOS-latest + target: osx-arm64 + frameworktype: --self-contained + + - kind: windows-x86 + os: windows-latest + target: win-x86 + frameworktype: --no-self-contained + - kind: windows-x64 + os: windows-latest + target: win-x64 + frameworktype: --no-self-contained + - kind: windows-arm + os: windows-latest + target: win-arm + frameworktype: --no-self-contained + - kind: windows-arm64 + os: windows-latest + target: win-arm64 + frameworktype: --no-self-contained + + - kind: windows-selfcont-x86 + os: windows-latest + target: win-x86 + frameworktype: --self-contained + - kind: windows-selfcont-x64 + os: windows-latest + target: win-x64 + frameworktype: --self-contained + - kind: windows-selfcont-arm + os: windows-latest + target: win-arm + frameworktype: --self-contained + - kind: windows-selfcont-arm64 + os: windows-latest + target: win-arm64 + frameworktype: --self-contained + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup dotnet + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Build EthernaGatewayCli project + shell: bash + run: | + tag=$(git describe --tags --abbrev=0) + release_name="etherna-gateway-cli-$tag-${{ matrix.kind }}" + # Build everything + dotnet publish src/EthernaGatewayCli/EthernaGatewayCli.csproj --runtime "${{ matrix.target }}" "${{ matrix.frameworktype }}" -c Release -o "$release_name" + # Pack files + if [ "${{ matrix.kind }}" == windows* ]; then + 7z a -tzip "${release_name}.zip" "./${release_name}/*" + else + tar czvf "${release_name}.tar.gz" "$release_name" + fi + + - name: Publish + uses: softprops/action-gh-release@v1 + with: + files: | + etherna-gateway-cli-* + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/EthernaGatewayCli.sln b/EthernaGatewayCli.sln index 1660173..32dc09b 100644 --- a/EthernaGatewayCli.sln +++ b/EthernaGatewayCli.sln @@ -5,6 +5,9 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D3B7E18B-46F8-4072-9D14-801FDB15868C}" ProjectSection(SolutionItems) = preProject README.md = README.md + nuget.config = nuget.config + .gitignore = .gitignore + .editorconfig = .editorconfig EndProjectSection EndProject Global diff --git a/README.md b/README.md index e93b7de..efc7573 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,20 @@ A CLI interface to the Etherna Gateway -## Issue reports +## Instructions +Download and extract binaries from [release page](https://github.com/Etherna/etherna-gateway-cli/releases). +Etherna Gateway CLI requires at least [.NET 8 Runtime](https://dotnet.microsoft.com/download/dotnet/8.0) and [ASP.NET Core 8 Runtime](https://dotnet.microsoft.com/download/dotnet/8.0) installed on local machine to run, or it needs the `selfcontained` version of package, that already contains framework dependencies. + +### How to use + +``` + +``` + +# Issue reports If you've discovered a bug, or have an idea for a new feature, please report it to our issue manager based on Jira https://etherna.atlassian.net/projects/EGC. -## Questions? Problems? +# Questions? Problems? For questions or problems please write an email to [info@etherna.io](mailto:info@etherna.io). diff --git a/nuget.config b/nuget.config new file mode 100644 index 0000000..dd4edcc --- /dev/null +++ b/nuget.config @@ -0,0 +1,9 @@ + + + + + + + + +