Skip to content

Commit

Permalink
add additional solution files
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm360 committed Mar 5, 2024
1 parent 93be9d3 commit e2811ed
Show file tree
Hide file tree
Showing 5 changed files with 212 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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
150 changes: 150 additions & 0 deletions .github/workflows/publish-stable.yml
Original file line number Diff line number Diff line change
@@ -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 }}
3 changes: 3 additions & 0 deletions EthernaGatewayCli.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```
<TO_DO>
```

# 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 [[email protected]](mailto:[email protected]).
9 changes: 9 additions & 0 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="ethernaMyget" value="https://www.myget.org/F/etherna/api/v3/index.json" />
</packageSources>
</configuration>

0 comments on commit e2811ed

Please sign in to comment.