19
19
DOTNET_NOLOGO : true
20
20
VersionPrefix : 42.42.${{ github.run_number }}
21
21
VersionLabel : ${{ github.ref }}
22
+ PackOnBuild : true
23
+ GeneratePackageOnBuild : true
24
+ GH_TOKEN : ${{ secrets.GH_TOKEN }}
25
+
26
+ defaults :
27
+ run :
28
+ shell : bash
22
29
23
30
jobs :
24
- build :
31
+ os-matrix :
25
32
runs-on : ubuntu-latest
33
+ outputs :
34
+ matrix : ${{ steps.lookup.outputs.matrix }}
26
35
steps :
27
36
- name : 🤘 checkout
28
- uses : actions/checkout@v2
37
+ uses : actions/checkout@v4
38
+
39
+ - name : 🔎 lookup
40
+ id : lookup
41
+ shell : pwsh
42
+ run : |
43
+ $path = './.github/workflows/os-matrix.json'
44
+ $os = if (test-path $path) { cat $path } else { '["ubuntu-latest"]' }
45
+ echo "matrix=$os" >> $env:GITHUB_OUTPUT
46
+
47
+ build :
48
+ needs : os-matrix
49
+ name : build-${{ matrix.os }}
50
+ runs-on : ${{ matrix.os }}
51
+ strategy :
52
+ matrix :
53
+ os : ${{ fromJSON(needs.os-matrix.outputs.matrix) }}
54
+ steps :
55
+ - name : 🤘 checkout
56
+ uses : actions/checkout@v4
29
57
with :
30
58
submodules : recursive
31
59
fetch-depth : 0
32
60
33
- - uses : actions/setup-dotnet@v3
34
- with :
35
- dotnet-version : ' 8.0.x'
36
- dotnet-quality : ' preview'
37
-
38
61
- name : 🙏 build
39
- run : dotnet build -m:1
62
+ run : dotnet build -m:1 -bl:build.binlog
63
+
64
+ - name : ⚙ GNU grep
65
+ if : matrix.os == 'macOS-latest'
66
+ run : |
67
+ brew install grep
68
+ echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> .bash_profile
40
69
41
70
- name : ⚙ azurite
42
71
run : |
46
75
- name : 🧪 test
47
76
uses : ./.github/workflows/test
48
77
49
- - name : 📦 pack
50
- run : dotnet pack -m:1
78
+ - name : 🐛 logs
79
+ uses : actions/upload-artifact@v3
80
+ if : runner.debug && always()
81
+ with :
82
+ name : logs
83
+ path : ' *.binlog'
51
84
52
85
# Only push CI package to sleet feed if building on ubuntu (fastest)
53
86
- name : 🚀 sleet
@@ -62,17 +95,12 @@ jobs:
62
95
runs-on : ubuntu-latest
63
96
steps :
64
97
- name : 🤘 checkout
65
- uses : actions/checkout@v2
98
+ uses : actions/checkout@v4
66
99
with :
67
100
submodules : recursive
68
101
fetch-depth : 0
69
102
70
- - uses : actions/setup-dotnet@v3
71
- with :
72
- dotnet-version : ' 8.0.x'
73
- dotnet-quality : ' preview'
74
-
75
103
- name : ✓ ensure format
76
104
run : |
77
105
dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget
78
- dotnet format style --verify-no-changes -v:diag --exclude ~/.nuget
106
+ dotnet format style --verify-no-changes -v:diag --exclude ~/.nuget
0 commit comments