44name : build
55on :
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
1822env :
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
2132defaults :
2233 run :
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
0 commit comments