generated from devantler/dotnet-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fb9681c
Showing
15 changed files
with
467 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.cs] | ||
# Rule: Set personal preferences for analyzer diagnostics | ||
csharp_style_expression_bodied_accessors = when_on_single_line | ||
csharp_style_expression_bodied_constructors = when_on_single_line | ||
csharp_style_expression_bodied_indexers = when_on_single_line | ||
csharp_style_expression_bodied_lambdas = when_on_single_line | ||
csharp_style_expression_bodied_local_functions = when_on_single_line | ||
csharp_style_expression_bodied_methods = when_on_single_line | ||
csharp_style_expression_bodied_operators = when_on_single_line | ||
csharp_prefer_braces = when_multiline | ||
csharp_style_namespace_declarations = file_scoped | ||
csharp_style_var_elsewhere = true | ||
csharp_style_var_when_type_is_apparent = true | ||
dotnet_sort_system_directives_first = true | ||
dotnet_style_require_accessibility_modifiers = omit_if_default | ||
|
||
[*.{received,verified}.*] | ||
generated_code = true | ||
|
||
[tests/**/*Tests.cs] | ||
dotnet_diagnostic.CA1707.severity = none |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @devantler @github-actions[bot] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": ["config:recommended", ":disableDependencyDashboard"], | ||
"flux": { | ||
"fileMatch": [ | ||
"^k8s/.+\\.ya?ml$" | ||
] | ||
}, | ||
"kubernetes": { | ||
"fileMatch": [ | ||
"^k8s/.+\\.ya?ml$" | ||
] | ||
}, | ||
"github-actions": { | ||
"enabled": false | ||
}, | ||
"minor": { | ||
"automerge": true | ||
}, | ||
"patch": { | ||
"automerge": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Dependabot auto-merge | ||
on: pull_request | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
auto-approve: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
if: github.actor == 'dependabot[bot]' | ||
steps: | ||
- uses: hmarr/auto-approve-action@v4 | ||
dependabot: | ||
runs-on: ubuntu-latest | ||
if: github.actor == 'dependabot[bot]' | ||
steps: | ||
- name: Dependabot metadata | ||
id: metadata | ||
uses: dependabot/fetch-metadata@v2 | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Approve pull request | ||
run: | | ||
# Use GitHub API to approve the pull request | ||
curl -X POST -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | ||
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews" \ | ||
-d '{"event": "APPROVE"}' | ||
- name: Enable auto-merge for Dependabot PRs | ||
if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type != 'version-update:semver-major' | ||
run: gh pr merge --auto --squash "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GH_TOKEN: ${{secrets.GITHUB_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Publish | ||
on: | ||
push: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish-github: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Set up .NET SDK | ||
uses: actions/setup-dotnet@v4.0.0 | ||
- name: Pack | ||
run: dotnet pack --configuration Release | ||
- name: Add GitHub Packages as NuGet Source | ||
run: dotnet nuget add source --username devantler --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/devantler/index.json" | ||
- name: Push to GitHub Packages | ||
run: dotnet nuget push src/**/*.nupkg --source "github" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate | ||
publish-nuget: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Set up .NET SDK | ||
uses: actions/setup-dotnet@v4.0.0 | ||
- name: Pack | ||
run: dotnet pack --configuration Release | ||
- name: Push to NuGet | ||
run: dotnet nuget push src/**/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Readme Tree | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
tree: | ||
runs-on: ubuntu-latest | ||
name: readme-tree | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create README Tree | ||
uses: RavelloH/readme-tree@v1.1.0 | ||
with: | ||
showdirectoryname: "yes" | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
branch: update-readme-tree | ||
commit-message: Update README Tree | ||
title: Update README Tree | ||
body: This PR includes new updates to the README Tree. | ||
labels: chore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Sync labels | ||
on: | ||
schedule: | ||
- cron: "0 7 * * 1" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
sync: | ||
name: Run EndBug/label-sync | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: EndBug/label-sync@v2 | ||
with: | ||
config-file: "https://raw.githubusercontent.com/devantler/.github/main/.github/labels.yaml" | ||
delete-other-labels: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
# Added 'edited' temporarily, as there currently is no trigger for when the base branch is updated. | ||
# https://github.com/orgs/community/discussions/64119 | ||
types: [opened, synchronize, reopened, ready_for_review, closed, edited] | ||
branches: main | ||
push: | ||
branches: main | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.draft == false | ||
steps: | ||
- name: 📑 Checkout | ||
uses: actions/checkout@v4 | ||
- name: ⚙️ Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
- name: 🧪 Test | ||
run: dotnet test --collect:"XPlat Code Coverage" | ||
- name: 📄 Upload Code Coverage to CodeCov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
files: tests/**/TestResults/**/coverage.cobertura.xml | ||
fail_ci_if_error: true | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: "TODOs" | ||
on: | ||
push: | ||
branches: [main] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- uses: "actions/checkout@v4" | ||
- uses: "alstr/todo-to-issue-action@v5" | ||
env: | ||
AUTO_ASSIGN: true | ||
LABEL: chore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# MacOS | ||
.DS_Store | ||
|
||
# .NET | ||
bin | ||
obj | ||
*.received.* | ||
**/TestResults/ | ||
|
||
# Temporary files | ||
*.tmp* |
Oops, something went wrong.