File tree Expand file tree Collapse file tree 30 files changed +481
-239
lines changed Expand file tree Collapse file tree 30 files changed +481
-239
lines changed Original file line number Diff line number Diff line change 11# normalize by default
22* text =auto encoding =UTF-8
33* .sh text eol =lf
4+ * .sbn eol =lf
45
56# These are windows specific files which we may as well ensure are
67# always crlf on checkout
Original file line number Diff line number Diff line change 1+ name : ⚙ dotnet
2+ description : Configures dotnet if the repo/org defines the DOTNET custom property
3+
4+ runs :
5+ using : composite
6+ steps :
7+ - name : 🔎 dotnet
8+ id : dotnet
9+ shell : bash
10+ run : |
11+ VERSIONS=$(gh api repos/${{ github.repository }}/properties/values | jq -r '.[] | select(.property_name == "DOTNET") | .value')
12+ # Remove extra whitespace from VERSIONS
13+ VERSIONS=$(echo "$VERSIONS" | tr -s ' ' | tr -d ' ')
14+ # Convert comma-separated to newline-separated
15+ NEWLINE_VERSIONS=$(echo "$VERSIONS" | tr ',' '\n')
16+ # Validate versions
17+ while IFS= read -r version; do
18+ if ! [[ $version =~ ^[0-9]+(\.[0-9]+(\.[0-9]+)?)?(\.x)?$ ]]; then
19+ echo "Error: Invalid version format: $version"
20+ exit 1
21+ fi
22+ done <<< "$NEWLINE_VERSIONS"
23+ # Write multiline output to $GITHUB_OUTPUT
24+ {
25+ echo 'versions<<EOF'
26+ echo "$NEWLINE_VERSIONS"
27+ echo 'EOF'
28+ } >> $GITHUB_OUTPUT
29+
30+ - name : ⚙ dotnet
31+ if : steps.dotnet.outputs.versions != ''
32+ uses : actions/setup-dotnet@v4
33+ with :
34+ dotnet-version : |
35+ ${{ steps.dotnet.outputs.versions }}
Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ updates:
2424 Extensions :
2525 patterns :
2626 - " Microsoft.Extensions*"
27+ exclude-patterns :
28+ - " Microsoft.Extensions.AI*"
29+ ExtensionsAI :
30+ patterns :
31+ - " Microsoft.Extensions.AI*"
2732 Web :
2833 patterns :
2934 - " Microsoft.AspNetCore*"
@@ -38,3 +43,6 @@ updates:
3843 ProtoBuf :
3944 patterns :
4045 - " protobuf-*"
46+ Spectre :
47+ patterns :
48+ - " Spectre.Console*"
Original file line number Diff line number Diff line change 2828 GH_TOKEN : ${{ secrets.GH_TOKEN }}
2929 MSBUILDTERMINALLOGGER : auto
3030 Configuration : ${{ github.event.inputs.configuration || 'Release' }}
31+ SLEET_FEED_URL : ${{ vars.SLEET_FEED_URL }}
3132
3233defaults :
3334 run :
6566 fetch-depth : 0
6667
6768 - name : ⚙ dotnet
68- uses : actions/setup-dotnet@v4
69- with :
70- dotnet-version : |
71- 6.x
72- 8.x
73- 9.x
69+ uses : devlooped/actions-dotnet-env@v1
7470
7571 - name : 🙏 build
7672 run : dotnet build -m:1 -bl:build.binlog
@@ -104,6 +100,9 @@ jobs:
104100 submodules : recursive
105101 fetch-depth : 0
106102
103+ - name : ⚙ dotnet
104+ uses : devlooped/actions-dotnet-env@v1
105+
107106 - name : ✓ ensure format
108107 run : |
109108 dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget
Original file line number Diff line number Diff line change 1+ name : dotnet-env
2+ on :
3+ workflow_dispatch :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - ' **/*.*proj'
9+
10+ jobs :
11+ which-dotnet :
12+ runs-on : ubuntu-latest
13+ permissions :
14+ contents : write
15+ pull-requests : write
16+
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+ token : ${{ env.GH_TOKEN }}
30+
31+ - name : 🤌 dotnet
32+ uses : devlooped/actions-which-dotnet@v1
33+
34+ - name : ✍ pull request
35+ uses : peter-evans/create-pull-request@v7
36+ with :
37+ base : main
38+ branch : which-dotnet
39+ delete-branch : true
40+ labels : dependencies
41+ title : " ⚙ Update dotnet versions"
42+ body : " Update dotnet versions"
43+ commit-message : " Update dotnet versions"
44+ token : ${{ env.GH_TOKEN }}
Original file line number Diff line number Diff line change 22name : dotnet-file-core
33on :
44 workflow_call :
5+ secrets :
6+ BOT_NAME :
7+ required : false
8+ BOT_EMAIL :
9+ required : false
10+ GH_TOKEN :
11+ required : false
512
613env :
714 DOTNET_NOLOGO : true
Original file line number Diff line number Diff line change 1212
1313jobs :
1414 run :
15+ permissions :
16+ contents : write
1517 uses : devlooped/oss/.github/workflows/dotnet-file-core.yml@main
16- secrets : inherit
18+ secrets :
19+ BOT_NAME : ${{ secrets.BOT_NAME }}
20+ BOT_EMAIL : ${{ secrets.BOT_EMAIL }}
21+ GH_TOKEN : ${{ secrets.GH_TOKEN }}
Original file line number Diff line number Diff line change 55 branches :
66 - ' main'
77 paths :
8- - ' **.md'
8+ - ' **.md'
99 - ' !changelog.md'
10+ - ' osmfeula.txt'
1011
1112jobs :
1213 includes :
@@ -31,10 +32,29 @@ jobs:
3132 - name : +Mᐁ includes
3233 uses : devlooped/actions-includes@v1
3334
35+ - name : 📝 OSMF EULA
36+ shell : pwsh
37+ run : |
38+ $file = "osmfeula.txt"
39+ $props = "src/Directory.Build.props"
40+ if (-not (test-path $file) -or -not (test-path $props)) {
41+ exit 0
42+ }
43+
44+ $product = dotnet msbuild $props -getproperty:Product
45+ if (-not $product) {
46+ write-error "To use OSMF EULA, ensure the $(Product) property is set in Directory.props"
47+ exit 1
48+ }
49+
50+ ((get-content -raw $file) -replace '\$product\$',$product).trim() | set-content $file
51+
3452 - name : ✍ pull request
3553 uses : peter-evans/create-pull-request@v6
3654 with :
37- add-paths : ' **.md'
55+ add-paths : |
56+ **.md
57+ osmfeula.txt
3858 base : main
3959 branch : markdown-includes
4060 delete-branch : true
Original file line number Diff line number Diff line change 1515 VersionLabel : ${{ github.ref }}
1616 GH_TOKEN : ${{ secrets.GH_TOKEN }}
1717 MSBUILDTERMINALLOGGER : auto
18-
18+ SLEET_FEED_URL : https://api.nuget.org/v3/index.json
19+
1920jobs :
2021 publish :
2122 runs-on : ${{ vars.PUBLISH_AGENT || 'ubuntu-latest' }}
2728 fetch-depth : 0
2829
2930 - name : ⚙ dotnet
30- uses : actions/setup-dotnet@v4
31- with :
32- dotnet-version : |
33- 6.x
34- 8.x
35- 9.x
31+ uses : devlooped/actions-dotnet-env@v1
3632
3733 - name : 🙏 build
3834 run : dotnet build -m:1 -bl:build.binlog
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ BenchmarkDotNet.Artifacts
1111.genaiscript
1212.idea
1313local.settings.json
14+ .env
1415
1516* .suo
1617* .sdf
You can’t perform that action at this time.
0 commit comments