Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update and revamp project structure #12

Merged
merged 5 commits into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"gitversion.tool": {
"version": "5.12.0",
"commands": [
"dotnet-gitversion"
]
}
}
}
39 changes: 26 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,39 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: Build
on:
- push
- pull_request
- workflow_dispatch
push:
branches:
- "main"
paths-ignore:
- "README.md"
pull_request:
workflow_dispatch:

jobs:
build-classlib:
name: Build class library
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
framework: [ 'net6.0', 'netstandard2.0' ]
project: [
"./src/Lib"
]
target-framwork: [
"net8.0",
"netstandard2.0",
]
env:
DOTNET_NOLOGO: true
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true

- name: Setup dotnet SDK
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Run 'dotnet restore'
run: dotnet restore "SmallsOnline.Subnetting.Lib.sln"
- name: Run 'dotnet publish'
run: dotnet publish "SmallsOnline.Subnetting.Lib.sln" --framework ${{ matrix.framework }}
global-json-file: global.json

- name: Run 'dotnet build'
run: dotnet build ${{ matrix.project }} --configuration Release --framework ${{ matrix.target-framwork }}
60 changes: 44 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[Bb]uild/

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
## Get latest from `dotnet new gitignore`

# dotenv files
.env

# User-specific files
*.rsuser
Expand Down Expand Up @@ -59,7 +60,7 @@ dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/

# .NET Core
# .NET
project.lock.json
project.fragment.lock.json
artifacts/
Expand Down Expand Up @@ -95,6 +96,7 @@ StyleCopReport.xml
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
Expand Down Expand Up @@ -298,6 +300,17 @@ node_modules/
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw

# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp

# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp

# Visual Studio 6 technical files
*.ncb
*.aps

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
Expand Down Expand Up @@ -354,6 +367,9 @@ ASALocalRun/
# Local History for Visual Studio
.localhistory/

# Visual Studio History (VSHistory) files
.vshistory/

# BeatPulse healthcheck temp database
healthchecksdb

Expand All @@ -366,6 +382,28 @@ MigrationBackup/
# Fody - auto-generated XML schema
FodyWeavers.xsd

# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp

# JetBrains Rider
*.sln.iml
.idea

##
## Visual studio for Mac
##
Expand Down Expand Up @@ -442,15 +480,5 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

# JetBrains Rider
.idea/
*.sln.iml

##
## Visual Studio Code
##
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# Vim temporary swap files
*.swp
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"debug.internalConsoleOptions": "neverOpen",
"git.detectSubmodules": false,
"dotnet.defaultSolution": "SmallsOnline.Subnetting.sln",
"dotnet.server.useOmnisharp": true,
"dotnet.server.path": "latest",
"task.quickOpen.history": 0,
"task.autoDetect": "off",
"powershell.startAutomatically": false
}
Loading