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,60 @@ 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 : actions/setup-dotnet@v4
70+ with :
71+ dotnet-version : |
72+ 6.x
73+ 8.x
74+ 9.x
5875
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
76+ - name : 🙏 build
77+ run : dotnet build -m:1 -bl:build.binlog
6478
6579 - name : 🧪 test
66- uses : ./.github/workflows/test
80+ run : |
81+ dotnet tool update -g dotnet-retest
82+ dotnet retest -- --no-build
6783
68- - name : 📦 pack
69- run : dotnet pack -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
84+ - name : 🐛 logs
85+ uses : actions/upload-artifact@v4
86+ if : runner.debug && always()
87+ with :
88+ name : logs
89+ path : ' *.binlog'
7090
71- # Only push CI package to sleet feed if building on ubuntu (fastest)
7291 - name : 🚀 sleet
7392 env :
7493 SLEET_CONNECTION : ${{ secrets.SLEET_CONNECTION }}
7594 if : env.SLEET_CONNECTION != ''
7695 run : |
77- dotnet tool install -g --version 4.0.18 sleet
96+ dotnet tool update sleet -g --allow-downgrade -- version $(curl -s --compressed ${{ vars.SLEET_FEED_URL }} | jq '.[" sleet:version"]' -r)
7897 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"
7998
8099 dotnet-format :
81100 runs-on : ubuntu-latest
82- needs : build
83101 steps :
84102 - name : 🤘 checkout
85- uses : actions/checkout@v2
103+ uses : actions/checkout@v4
86104 with :
87105 submodules : recursive
88106 fetch-depth : 0
89107
108+ - name : ⚙ dotnet
109+ uses : actions/setup-dotnet@v4
110+ with :
111+ dotnet-version : |
112+ 6.x
113+ 8.x
114+ 9.x
115+
90116 - name : ✓ ensure format
91- run : dotnet format --verify-no-changes -v:diag --exclude ~/.nuget
117+ run : |
118+ dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget
119+ dotnet format style --verify-no-changes -v:diag --exclude ~/.nuget
0 commit comments