Skip to content

Commit

Permalink
Mainstream the files in the solution to GSoft's library standard
Browse files Browse the repository at this point in the history
  • Loading branch information
Zav authored Jan 6, 2023
1 parent b9977d0 commit ba16b0d
Show file tree
Hide file tree
Showing 31 changed files with 329 additions and 270 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
root = true

[*]
indent_style = space
charset = utf-8
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
*.yml text eol=lf
*.yaml text eol=lf
*.Dockerfile text eol=lf
Dockerfile text eol=lf
LICENSE text eol=lf
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @gsoft-inc/tech-platform
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment (please complete the following information):**
- OS: [e.g. Windows]
- Version: [e.g. 1.2.3]
- IDE: [e.g. Rider]
- etc.

**Additional context**
Add any other context about the problem here.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "nuget"
directory: "/src"
schedule:
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
23 changes: 6 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,21 @@
name: CI build
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master
branches: ["main", "master"]

jobs:
build:
main:
runs-on: ubuntu-latest

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

- uses: actions/setup-dotnet@v2
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
6.0.x
dotnet-version: "6.0.x"

- run: ./build.ps1
- run: ./Build.ps1
shell: pwsh

- uses: actions/upload-artifact@v3
with:
name: packages
path: ./.output/**/*
35 changes: 35 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CodeQL

on:
push:
branches: ["main", "master"]
pull_request:
branches: ["main", "master"]
schedule:
- cron: "22 6 * * 0"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: csharp

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:csharp"
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish

on:
push:
branches: ["main", "master"]
tags: ["*.*.*"]

jobs:
main:
runs-on: ubuntu-latest

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

- uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"

- run: ./Build.ps1
shell: pwsh
env:
NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }}
NUGET_API_KEY: ${{ secrets.GSOFTINC_NUGET_API_KEY }}
29 changes: 0 additions & 29 deletions .github/workflows/release.yml

This file was deleted.

7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ FodyWeavers.xsd
*.msm
*.msp

# JetBrains Rider
# JetBrains IDEs
.idea/
*.sln.iml

Expand All @@ -386,6 +386,5 @@ ehthumbs.db
Thumbs.db
$RECYCLE.BIN/

# Cake
build/tools/**
!build/tools/packages.config
# Build output
/.output/
35 changes: 35 additions & 0 deletions Build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#Requires -Version 5.0

Begin {
$ErrorActionPreference = "stop"
}

Process {
function Exec([scriptblock]$Command) {
& $Command
if ($LASTEXITCODE -ne 0) {
throw ("An error occurred while executing command: {0}" -f $Command)
}
}

$workingDir = Join-Path $PSScriptRoot "src"
$outputDir = Join-Path $PSScriptRoot ".output"
$nupkgsPath = Join-Path $outputDir "*.nupkg"

try {
Push-Location $workingDir
Remove-Item $outputDir -Force -Recurse -ErrorAction SilentlyContinue

Exec { & dotnet clean -c Release }
Exec { & dotnet build -c Release }
Exec { & dotnet test -c Release --no-build -r "$outputDir" --no-restore -l "trx" -l "console;verbosity=detailed" }
Exec { & dotnet pack -c Release --no-build -o "$outputDir" }

if (($null -ne $env:NUGET_SOURCE ) -and ($null -ne $env:NUGET_API_KEY)) {
Exec { & dotnet nuget push "$nupkgsPath" -s $env:NUGET_SOURCE -k $env:NUGET_API_KEY }
}
}
finally {
Pop-Location
}
}
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Contributing

We do not accept external pull requests yet.
94 changes: 94 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatch
assembly-informational-format: "{InformationalVersion}"
mode: ContinuousDelivery
increment: Inherit
continuous-delivery-fallback-tag: ci
tag-prefix: "[vV]"
major-version-bump-message: '\+semver:\s?(breaking|major)'
minor-version-bump-message: '\+semver:\s?(feature|minor)'
patch-version-bump-message: '\+semver:\s?(fix|patch)'
no-bump-message: '\+semver:\s?(none|skip)'
legacy-semver-padding: 4
build-metadata-padding: 4
commits-since-version-source-padding: 4
tag-pre-release-weight: 60000
commit-message-incrementing: Enabled
update-build-number: true

branches:
main:
regex: ^(master|main)$
mode: ContinuousDeployment
tag: preview
increment: Patch
prevent-increment-of-merged-branch-version: true
track-merge-target: false
source-branches: ["develop", "release"]
tracks-release-branches: false
is-release-branch: false
is-mainline: true
pre-release-weight: 55000
develop:
regex: ^dev(elop)?(ment)?$
mode: ContinuousDeployment
tag: alpha
increment: Minor
prevent-increment-of-merged-branch-version: false
track-merge-target: true
source-branches: []
tracks-release-branches: true
is-release-branch: false
is-mainline: false
pre-release-weight: 0
release:
regex: ^releases?[/-]
mode: ContinuousDelivery
tag: beta
increment: None
prevent-increment-of-merged-branch-version: true
track-merge-target: false
source-branches: ["develop", "main", "support", "release"]
tracks-release-branches: false
is-release-branch: true
is-mainline: false
pre-release-weight: 30000
feature:
regex: ^features?[/-]
mode: ContinuousDelivery
tag: useBranchName
increment: Inherit
prevent-increment-of-merged-branch-version: false
track-merge-target: false
source-branches:
["develop", "main", "release", "feature", "support", "hotfix"]
tracks-release-branches: false
is-release-branch: false
is-mainline: false
pre-release-weight: 30000
pull-request:
regex: ^(pull|pull\-requests|pr)[/-]
mode: ContinuousDelivery
tag: PullRequest
increment: Inherit
prevent-increment-of-merged-branch-version: false
tag-number-pattern: '[/-](?<number>\d+)[-/]'
track-merge-target: false
source-branches:
["develop", "main", "release", "feature", "support", "hotfix"]
tracks-release-branches: false
is-release-branch: false
is-mainline: false
pre-release-weight: 30000
hotfix:
regex: ^hotfix(es)?[/-]
mode: ContinuousDelivery
tag: beta
increment: Patch
prevent-increment-of-merged-branch-version: false
track-merge-target: false
source-branches: ["develop", "main", "support"]
tracks-release-branches: false
is-release-branch: false
is-mainline: false
pre-release-weight: 30000
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
This package adds variable substitution configuration provider implementation for [Microsoft.Extensions.Configuration](https://docs.microsoft.com/en-us/dotnet/core/extensions/configuration).

[![nuget](https://img.shields.io/nuget/v/GSoft.Extensions.Configuration.Substitution.svg?logo=nuget)](https://www.nuget.org/packages/GSoft.Extensions.Configuration.Substitution/)
[![build](https://img.shields.io/github/workflow/status/gsoft-inc/gsoft-extensions-configuration-substitution/CI%20build?logo=github)](https://github.com/gsoft-inc/gsoft-extensions-configuration-substitution/actions/workflows/ci.yml)

[![build](https://img.shields.io/github/actions/workflow/status/gsoft-inc/gsoft-extensions-configuration-substitution/publish.yml?logo=github)](https://github.com/gsoft-inc/gsoft-extensions-configuration-substitution/actions/workflows/publish.yml)

## Getting started

Expand Down
3 changes: 3 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Security Policy

If you'd like to report a vulnerability, please open a [GitHub issue](https://github.com/gsoft-inc/gsoft-extensions-configuration-substitution/issues).
2 changes: 0 additions & 2 deletions build.ps1

This file was deleted.

1 change: 0 additions & 1 deletion build.sh

This file was deleted.

Loading

0 comments on commit ba16b0d

Please sign in to comment.