Skip to content
Closed
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
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ indent_size = 2

; .NET solution files - match defaults for VS
[*.sln]
end_of_line = crlf
indent_style = tab

; Config - match XML and default nuget.config template
Expand Down Expand Up @@ -197,3 +198,7 @@ charset = utf-8-bom
; ReStructuredText - standard indentation format from examples
[*.rst]
indent_size = 2

# YAML - match standard YAML like Kubernetes and GitHub Actions
[*.{yaml,yml}]
indent_size = 2
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*.png binary
*.gif binary

*.cs text=auto diff=csharp
*.cs text=auto diff=csharp
*.vb text=auto
*.resx text=auto
*.c text=auto
Expand Down
88 changes: 0 additions & 88 deletions .github/CONTRIBUTING.md

This file was deleted.

39 changes: 0 additions & 39 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

23 changes: 0 additions & 23 deletions .github/ISSUE_TEMPLATE/question.md

This file was deleted.

7 changes: 0 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and Test
on:
workflow_call:
secrets:
CODECOV_TOKEN:
description: Token for uploading code coverage metrics to CodeCov.io.
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Build and test
run: dotnet msbuild ./default.proj
- name: Upload coverage
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
files: artifacts/logs/*/coverage.cobertura.xml
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload package artifacts
uses: actions/upload-artifact@v4
with:
name: packages
path: |
artifacts/packages/*.nupkg
artifacts/packages/*.snupkg
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Continuous Integration
on:
pull_request:
branches:
- develop
- master
push:
branches:
- develop
- master
- feature/*
tags:
- v[0-9]+.[0-9]+.[0-9]+
# If multiple pushes happen quickly in succession, cancel the running build and
# start a new one.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# Linting
dotnet-format:
uses: ./.github/workflows/dotnet-format.yml
pre-commit:
uses: ./.github/workflows/pre-commit.yml
# Build and test
build:
uses: ./.github/workflows/build.yml
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# Publish beta and release packages.
publish:
uses: ./.github/workflows/publish.yml
needs:
- build
- dotnet-format
- pre-commit
if: ${{ github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/v') }}
secrets:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
14 changes: 14 additions & 0 deletions .github/workflows/dotnet-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: dotnet format
on:
workflow_call:
jobs:
dotnet-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: dotnet format
run: dotnet format Autofac.Extensions.DependencyInjection.sln --verify-no-changes
12 changes: 12 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: pre-commit
on:
workflow_call:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: pre-commit/[email protected]
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish
on:
workflow_call:
secrets:
NUGET_API_KEY:
description: Token for publishing packages to NuGet.
required: true
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Download package artifacts
uses: actions/download-artifact@v4
with:
name: packages
path: artifacts/packages
- name: Publish to GitHub Packages
run: |
dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/autofac/index.json"
dotnet nuget push ./artifacts/packages/*.nupkg --skip-duplicate --source github --api-key ${{ secrets.GITHUB_TOKEN }}
dotnet nuget push ./artifacts/packages/*.snupkg --skip-duplicate --source github --api-key ${{ secrets.GITHUB_TOKEN }}
- name: Publish to NuGet
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: |
dotnet nuget push ./artifacts/packages/*.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}
10 changes: 3 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# Project specific files
artifacts/
BenchmarkDotNet.Artifacts/

# User-specific files
*.suo
Expand Down Expand Up @@ -83,11 +84,6 @@ _TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover

# Coverage
coverage.*
codecov.sh
coverage/

# NCrunch
*.ncrunch*
.*crunch*.local.xml
Expand All @@ -113,7 +109,6 @@ publish/
*.pubxml

# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
packages/

# Windows Azure Build Output
Expand All @@ -138,6 +133,7 @@ node_modules/
bower_components/
wwwroot/
project.lock.json
*.Designer.cs

# RIA/Silverlight projects
Generated_Code/
Expand Down Expand Up @@ -170,5 +166,5 @@ $RECYCLE.BIN/
# Mac crap
.DS_Store

# JetBrains Rider crap
# JetBrains Rider
.idea
3 changes: 3 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"MD013": false
}
Loading
Loading