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' }}
31+ SLEET_FEED_URL : ${{ vars.SLEET_FEED_URL }}
2032
2133defaults :
2234 run :
2941 matrix : ${{ steps.lookup.outputs.matrix }}
3042 steps :
3143 - name : 🤘 checkout
32- uses : actions/checkout@v2
44+ uses : actions/checkout@v4
3345
3446 - name : 🔎 lookup
3547 id : lookup
@@ -48,44 +60,55 @@ jobs:
4860 os : ${{ fromJSON(needs.os-matrix.outputs.matrix) }}
4961 steps :
5062 - name : 🤘 checkout
51- uses : actions/checkout@v2
63+ uses : actions/checkout@v4
5264 with :
5365 submodules : recursive
5466 fetch-depth : 0
5567
56- - name : 🙏 build
57- run : dotnet build -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
68+ - name : ⚙ dotnet
69+ uses : ./.github/actions/dotnet
5870
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
71+ - name : 🙏 build
72+ run : dotnet build -m:1 -bl:build.binlog
6473
6574 - name : 🧪 test
66- uses : ./.github/workflows/test
75+ run : |
76+ dotnet tool update -g dotnet-retest
77+ dotnet retest -- --no-build
6778
68- - name : 📦 pack
69- run : dotnet pack -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
79+ - name : 🐛 logs
80+ uses : actions/upload-artifact@v4
81+ if : runner.debug && always()
82+ with :
83+ name : logs
84+ path : ' *.binlog'
7085
71- # Only push CI package to sleet feed if building on ubuntu (fastest)
7286 - name : 🚀 sleet
7387 env :
7488 SLEET_CONNECTION : ${{ secrets.SLEET_CONNECTION }}
7589 if : env.SLEET_CONNECTION != ''
7690 run : |
77- dotnet tool install -g --version 4.0.18 sleet
91+ dotnet tool update sleet -g --allow-downgrade -- version $(curl -s --compressed ${{ vars.SLEET_FEED_URL }} | jq '.[" sleet:version"]' -r)
7892 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"
7993
8094 dotnet-format :
8195 runs-on : ubuntu-latest
82- needs : build
8396 steps :
8497 - name : 🤘 checkout
85- uses : actions/checkout@v2
98+ uses : actions/checkout@v4
8699 with :
87100 submodules : recursive
88101 fetch-depth : 0
89102
103+ - name : ⚙ dotnet
104+ uses : actions/setup-dotnet@v4
105+ with :
106+ dotnet-version : |
107+ 6.x
108+ 8.x
109+ 9.x
110+
90111 - name : ✓ ensure format
91- run : dotnet format --verify-no-changes -v:diag --exclude ~/.nuget
112+ run : |
113+ dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget
114+ dotnet format style --verify-no-changes -v:diag --exclude ~/.nuget
0 commit comments