Skip to content

Commit 7a9bdee

Browse files
committed
⬆️ Bump files with dotnet-file sync
# devlooped/oss - If we provide a docs category, don't exclude docs :) devlooped/oss@0c23e24 - Remove -l:trx since it's just for dotnet test, not build devlooped/oss@0f7f7f7 - Attempt to get necessary permissions for default token devlooped/oss@85829f2 - Switch back to latest stable includes devlooped/oss@875284b - Improve triage actions on issues devlooped/oss@33000c0 - Make sure all stable versions are available for build/test devlooped/oss@06e898c - Improve default value for GenerateDocumentationFile devlooped/oss@b76de49 - SponsorLink code should be checked as regular code devlooped/oss@e81ab75 - Skip discussion issues when generating changelog devlooped/oss@08d83cb - Update .gitignore to ignore .genaiscript devlooped/oss@e0be248 - Update typed resgen to opt-in only devlooped/oss@a8b2080 - Simplify .gitattributes devlooped/oss@5f92a68 - Ignore reusable workflow when initializing repo devlooped/oss@b84f84a - Update to checkout@v4 devlooped/oss@5fb1723 - Update nuget.config with new(ish?) MS certs devlooped/oss@032439d - Fix dependabot group for tests devlooped/oss@49661db - Point to main for dotnet-file sync workflow devlooped/oss@59aaf43
1 parent e113047 commit 7a9bdee

19 files changed

+446
-199
lines changed

.editorconfig

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ dotnet_style_require_accessibility_modifiers = omit_if_default:error
5858
dotnet_diagnostic.IDE0040.severity = error
5959

6060
[*.cs]
61+
# Top-level files are definitely OK
62+
csharp_using_directive_placement = outside_namespace:silent
63+
csharp_style_namespace_declarations = block_scoped:silent
64+
csharp_prefer_simple_using_statement = true:suggestion
65+
csharp_prefer_braces = true:silent
66+
6167
# Prefer "var" everywhere
6268
csharp_style_var_for_built_in_types = true:suggestion
6369
csharp_style_var_when_type_is_apparent = true:suggestion
@@ -89,9 +95,15 @@ csharp_new_line_before_members_in_object_initializers = true
8995
csharp_new_line_before_members_in_anonymous_types = true
9096

9197
# Test settings
92-
[**/*Tests*/*{.cs,.vb}]
98+
[**/*Tests*/**{.cs,.vb}]
9399
# xUnit1013: Public method should be marked as test. Allows using records as test classes
94100
dotnet_diagnostic.xUnit1013.severity = none
95101

102+
# CS9113: Parameter is unread (usually, ITestOutputHelper)
103+
dotnet_diagnostic.CS9113.severity = none
104+
105+
# Default severity for analyzer diagnostics with category 'Style'
106+
dotnet_analyzer_diagnostic.category-Style.severity = none
107+
96108
# VSTHRD200: Use "Async" suffix for async methods
97109
dotnet_diagnostic.VSTHRD200.severity = none

.gitattributes

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
1-
# sln, csproj files (and friends) are always CRLF, even on linux
2-
*.sln text eol=crlf
3-
*.proj text eol=crlf
4-
*.csproj text eol=crlf
1+
# normalize by default
2+
* text=auto encoding=UTF-8
3+
*.sh text eol=lf
54

65
# These are windows specific files which we may as well ensure are
76
# always crlf on checkout
87
*.bat text eol=crlf
98
*.cmd text eol=crlf
10-
11-
# Opt in known filetypes to always normalize line endings on checkin
12-
# and always use native endings on checkout
13-
*.c text
14-
*.config text
15-
*.h text
16-
*.cs text
17-
*.md text
18-
*.tt text
19-
*.txt text
20-
21-
# Some must always be checked out as lf so enforce that for those files
22-
# If these are not lf then bash/cygwin on windows will not be able to
23-
# excute the files
24-
*.sh text eol=lf

.github/dependabot.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,34 @@ updates:
77
directory: /
88
schedule:
99
interval: daily
10+
groups:
11+
Azure:
12+
patterns:
13+
- "Azure*"
14+
- "Microsoft.Azure*"
15+
Identity:
16+
patterns:
17+
- "System.IdentityModel*"
18+
- "Microsoft.IdentityModel*"
19+
System:
20+
patterns:
21+
- "System*"
22+
exclude-patterns:
23+
- "System.IdentityModel*"
24+
Extensions:
25+
patterns:
26+
- "Microsoft.Extensions*"
27+
Web:
28+
patterns:
29+
- "Microsoft.AspNetCore*"
30+
Tests:
31+
patterns:
32+
- "Microsoft.NET.Test*"
33+
- "xunit*"
34+
- "coverlet*"
35+
ThisAssembly:
36+
patterns:
37+
- "ThisAssembly*"
38+
ProtoBuf:
39+
patterns:
40+
- "protobuf-*"

.github/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ changelog:
88
- invalid
99
- wontfix
1010
- need info
11-
- docs
1211
- techdebt
1312
authors:
1413
- devlooped-bot
@@ -24,6 +23,7 @@ changelog:
2423
- title: 📝 Documentation updates
2524
labels:
2625
- docs
26+
- documentation
2727
- title: 🔨 Other
2828
labels:
2929
- '*'

.github/workflows/build.yml

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,30 @@
44
name: build
55
on:
66
workflow_dispatch:
7+
inputs:
8+
configuration:
9+
type: choice
10+
description: Configuration
11+
options:
12+
- Release
13+
- Debug
714
push:
815
branches: [ main, dev, 'dev/*', 'feature/*', 'rel/*' ]
916
paths-ignore:
1017
- changelog.md
11-
- code-of-conduct.md
12-
- security.md
13-
- support.md
1418
- readme.md
1519
pull_request:
1620
types: [opened, synchronize, reopened]
1721

1822
env:
1923
DOTNET_NOLOGO: true
24+
PackOnBuild: true
25+
GeneratePackageOnBuild: true
26+
VersionPrefix: 42.42.${{ github.run_number }}
27+
VersionLabel: ${{ github.ref }}
28+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
29+
MSBUILDTERMINALLOGGER: auto
30+
Configuration: ${{ github.event.inputs.configuration || 'Release' }}
2031

2132
defaults:
2233
run:
@@ -29,7 +40,7 @@ jobs:
2940
matrix: ${{ steps.lookup.outputs.matrix }}
3041
steps:
3142
- name: 🤘 checkout
32-
uses: actions/checkout@v2
43+
uses: actions/checkout@v4
3344

3445
- name: 🔎 lookup
3546
id: lookup
@@ -48,44 +59,52 @@ jobs:
4859
os: ${{ fromJSON(needs.os-matrix.outputs.matrix) }}
4960
steps:
5061
- name: 🤘 checkout
51-
uses: actions/checkout@v2
62+
uses: actions/checkout@v4
5263
with:
5364
submodules: recursive
5465
fetch-depth: 0
5566

56-
- name: 🙏 build
57-
run: dotnet build -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
67+
- name: ⚙ dotnet
68+
uses: actions/setup-dotnet@v4
69+
with:
70+
dotnet-version: |
71+
6.x
72+
8.x
73+
9.x
5874
59-
- name: ⚙ GNU grep
60-
if: matrix.os == 'macOS-latest'
61-
run: |
62-
brew install grep
63-
echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> .bash_profile
75+
- name: 🙏 build
76+
run: dotnet build -m:1 -bl:build.binlog
6477

6578
- name: 🧪 test
66-
uses: ./.github/workflows/test
79+
run: |
80+
dotnet tool update -g dotnet-retest
81+
dotnet retest -- --no-build
6782
68-
- name: 📦 pack
69-
run: dotnet pack -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
83+
- name: 🐛 logs
84+
uses: actions/upload-artifact@v4
85+
if: runner.debug && always()
86+
with:
87+
name: logs
88+
path: '*.binlog'
7089

71-
# Only push CI package to sleet feed if building on ubuntu (fastest)
7290
- name: 🚀 sleet
7391
env:
7492
SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }}
7593
if: env.SLEET_CONNECTION != ''
7694
run: |
77-
dotnet tool install -g --version 4.0.18 sleet
95+
dotnet tool update sleet -g --allow-downgrade --version $(curl -s --compressed ${{ vars.SLEET_FEED_URL }} | jq '.["sleet:version"]' -r)
7896
sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" || echo "No packages found"
7997
8098
dotnet-format:
8199
runs-on: ubuntu-latest
82-
needs: build
83100
steps:
84101
- name: 🤘 checkout
85-
uses: actions/checkout@v2
102+
uses: actions/checkout@v4
86103
with:
87104
submodules: recursive
88105
fetch-depth: 0
89106

90107
- name: ✓ ensure format
91-
run: dotnet format --verify-no-changes -v:diag --exclude ~/.nuget
108+
run: |
109+
dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget
110+
dotnet format style --verify-no-changes -v:diag --exclude ~/.nuget

.github/workflows/changelog.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
usernames-as-github-logins=true
22
issues_wo_labels=true
33
pr_wo_labels=true
4-
exclude-labels=bydesign,dependencies,duplicate,question,invalid,wontfix,need info,docs
4+
exclude-labels=bydesign,dependencies,duplicate,discussion,question,invalid,wontfix,need info,docs
55
enhancement-label=:sparkles: Implemented enhancements:
66
bugs-label=:bug: Fixed bugs:
77
issues-label=:hammer: Other:

.github/workflows/changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
github_token: ${{ secrets.GITHUB_TOKEN }}
1818

1919
- name: 🤘 checkout
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
2323
ref: main
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Synchronizes .netconfig-configured files with dotnet-file
2+
name: dotnet-file-core
3+
on:
4+
workflow_call:
5+
6+
env:
7+
DOTNET_NOLOGO: true
8+
9+
defaults:
10+
run:
11+
shell: pwsh
12+
13+
jobs:
14+
sync:
15+
runs-on: ubuntu-latest
16+
continue-on-error: true
17+
steps:
18+
- name: 🤖 defaults
19+
uses: devlooped/actions-bot@v1
20+
with:
21+
name: ${{ secrets.BOT_NAME }}
22+
email: ${{ secrets.BOT_EMAIL }}
23+
gh_token: ${{ secrets.GH_TOKEN }}
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: 🤘 checkout
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
ref: main
31+
token: ${{ env.GH_TOKEN }}
32+
33+
- name: ⌛ rate
34+
if: github.event_name != 'workflow_dispatch'
35+
run: |
36+
# add random sleep since we run on fixed schedule
37+
sleep (get-random -max 60)
38+
# get currently authenticated user rate limit info
39+
$rate = gh api rate_limit | convertfrom-json | select -expandproperty rate
40+
# if we don't have at least 100 requests left, wait until reset
41+
if ($rate.remaining -lt 10) {
42+
$wait = ($rate.reset - (Get-Date (Get-Date).ToUniversalTime() -UFormat %s))
43+
echo "Rate limit remaining is $($rate.remaining), waiting for $($wait / 1000) seconds to reset"
44+
sleep $wait
45+
$rate = gh api rate_limit | convertfrom-json | select -expandproperty rate
46+
echo "Rate limit has reset to $($rate.remaining) requests"
47+
}
48+
49+
- name: 🔄 sync
50+
run: |
51+
dotnet tool update -g dotnet-gcm
52+
# store credentials in plaintext for linux compat
53+
git config --local credential.credentialStore plaintext
54+
dotnet gcm store --protocol=https --host=github.com --username=$env:GITHUB_ACTOR --password=$env:GH_TOKEN
55+
gh auth status
56+
57+
dotnet tool update -g dotnet-file
58+
$changelog = "$([System.IO.Path]::GetTempPath())dotnet-file.md"
59+
dotnet file sync -c:$changelog
60+
if (test-path $changelog) {
61+
echo 'CHANGES<<EOF' >> $env:GITHUB_ENV
62+
cat $changelog >> $env:GITHUB_ENV
63+
echo 'EOF' >> $env:GITHUB_ENV
64+
cat $changelog
65+
} else {
66+
echo 'No changelog was generated'
67+
}
68+
69+
- name: +Mᐁ includes
70+
uses: devlooped/actions-includes@v1
71+
with:
72+
validate: false
73+
74+
- name: ✍ pull request
75+
uses: peter-evans/create-pull-request@v7
76+
with:
77+
base: main
78+
branch: dotnet-file-sync
79+
delete-branch: true
80+
labels: dependencies
81+
author: ${{ env.BOT_AUTHOR }}
82+
committer: ${{ env.BOT_AUTHOR }}
83+
commit-message: ⬆️ Bump files with dotnet-file sync
84+
85+
${{ env.CHANGES }}
86+
title: "⬆️ Bump files with dotnet-file sync"
87+
body: ${{ env.CHANGES }}
88+
token: ${{ env.GH_TOKEN }}

.github/workflows/includes.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
jobs:
1212
includes:
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
1417
steps:
1518
- name: 🤖 defaults
1619
uses: devlooped/actions-bot@v1
@@ -21,16 +24,17 @@ jobs:
2124
github_token: ${{ secrets.GITHUB_TOKEN }}
2225

2326
- name: 🤘 checkout
24-
uses: actions/checkout@v2
27+
uses: actions/checkout@v4
2528
with:
2629
token: ${{ env.GH_TOKEN }}
2730

2831
- name: +Mᐁ includes
29-
uses: devlooped/actions-include@v1
32+
uses: devlooped/actions-includes@v1
3033

3134
- name: ✍ pull request
32-
uses: peter-evans/create-pull-request@v4
35+
uses: peter-evans/create-pull-request@v6
3336
with:
37+
add-paths: '**.md'
3438
base: main
3539
branch: markdown-includes
3640
delete-branch: true

0 commit comments

Comments
 (0)