Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
nils-a committed Aug 8, 2022
0 parents commit 12bcff9
Show file tree
Hide file tree
Showing 25 changed files with 1,251 additions and 0 deletions.
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": {
"cake.tool": {
"version": "0.38.5",
"commands": [
"dotnet-cake"
]
}
}
}
38 changes: 38 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
root = true

[*]
charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[.cs]


# This may not be needed, but kept for compatibility with VS
[*.{sln,csproj}]
end_of_line = crlf

# Markdown files allows the use of trailing spaces to denote
# a line break
[*.md]
trim_trailing_whitespace = false

# Batch and powershell files requires crlf to be
# used as the line ending.
# Powershell also requires UTF-8 with BOM encoding
# to function if utf8 characters is used (maibe batch files as well)
[*.{bat,ps1}]
charset = utf-8-bom
end_of_line = crlf

# Shell scripts requires the use of lf line endings
# to be able to run.
[*.sh]
end_of_line = lf

# The visual studio code file
# requires the use of crlf line endings
[tasks.json]
end_of_line = crlf
21 changes: 21 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto

*.cs text diff=csharp

*.ps1 text eol=crlf
*.bat text eol=crlf
*.sln text eol=crlf
*.csproj text eol=crlf
tasks.json text eol=crlf

*.sh text eol=lf

*.md text whitespace=-trailing-space

# Exclude files from exporting

.gitattributes export-ignore
.gitignore export-ignore
10 changes: 10 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [ "github>nils-a/renovate-config" ],
"packageRules": [
{
"matchPackageNames": ["cake.tool", "Spectre.Console", "Microsoft.Extensions.DependencyInjection"],
"enabled": false
}
]
}
87 changes: 87 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Build

on:
push:
branches:
- main
- develop
- "feature/**"
- "release/**"
- "hotfix/**"
tags:
- "*"
paths-ignore:
- "README.md"
pull_request:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ windows-2019, ubuntu-18.04, macos-10.15 ]
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_PAT: ${{ secrets.GH_TOKEN }}
AZURE_USER: ${{ secrets.AZURE_USER }}
AZURE_PASSWORD: ${{ secrets.AZURE_PASSWORD }}
AZURE_SOURCE: ${{ secrets.AZURE_SOURCE }}
GPR_USER: ${{ secrets.GPR_USER }}
GPR_PASSWORD: ${{ secrets.GPR_PASSWORD }}
GPR_SOURCE: ${{ secrets.GPR_SOURCE }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
NUGET_SOURCE: "https://api.nuget.org/v3/index.json"
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
#WYAM_ACCESS_TOKEN: ${{ secrets.WYAM_ACCESS_TOKEN }}
#WYAM_DEPLOY_BRANCH: "gh-pages"
#WYAM_DEPLOY_REMOTE: ${{ github.event.repository.html_url }}

steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Fetch all tags and branches
run: git fetch --prune --unshallow
- uses: actions/[email protected]
with:
# codecov needs 2.1
dotnet-version: '2.1.818'
- uses: actions/[email protected]
with:
dotnet-version: '3.1.x'
- uses: actions/[email protected]
with:
dotnet-version: '5.0.x'
- uses: actions/[email protected]
with:
dotnet-version: '6.0.x'
- name: Cache Tools
uses: actions/cache@v3
with:
path: tools
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
- name: Build project
uses: cake-build/cake-action@v1
with:
script-path: recipe.cake
target: CI
verbosity: Diagnostic
cake-version: 0.38.5
cake-bootstrap: true
- name: Upload Issues
uses: actions/upload-artifact@v3
with:
if-no-files-found: warn
name: ${{ matrix.os }} Issues
path: |
BuildArtifacts/report.html
BuildArtifacts/**/coverlet/*.xml
- name: Upload Packages
uses: actions/upload-artifact@v3
if: runner.os == 'Windows'
with:
if-no-files-found: warn
name: package
path: BuildArtifacts/Packages/**/*
76 changes: 76 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"

on:
push:
branches: [develop]
pull_request:
# The branches below must be a subset of the branches above
branches: [develop]
schedule:
- cron: '0 15 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-18.04

strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['csharp']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/[email protected]
with:
# codecov needs 2.1
dotnet-version: '2.1.818'
- uses: actions/[email protected]
with:
dotnet-version: '3.1.x'
- uses: actions/[email protected]
with:
dotnet-version: '5.0.x'
- uses: actions/[email protected]
with:
dotnet-version: '6.0.x'

- name: Cache Tools
uses: actions/cache@v3
with:
path: tools
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- name: Build project
uses: cake-build/cake-action@v1
with:
script-path: recipe.cake
target: DotNetCore-Build
cake-version: 0.38.5
cake-bootstrap: true

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
56 changes: 56 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Ignore everything in vscode folder
# except what we want users to
# contribute if there is any
# improvement
.vscode/*
!.vscode/extensions.json
!.vscode/settings.json
!.vscode/tasks.json

# User-specific files in Visual Studio
*.suo
*.user
*.userosscache
*.sln.docstates
.vs/

# GhostDoc plugin settings file
*.GhostDoc.xml

# Ignore cake tools directory
tools/*

# Ignore build artifacts
BuildArtifacts/
[Oo]bj/
[Bb]in/
[Tt]estresults/

# OS Specific files
*~
.DS_Store
.AppleDouble
.LSOverride

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Windows shortcuts
*.lnk

# Thumbnails
._*

# Cake.Graph related
docs/input/tasks/*

# Wyam related
config.wyam.*
/src/packages/
.idea/
.cake/
Loading

0 comments on commit 12bcff9

Please sign in to comment.